Skip to content

Commit 58932b9

Browse files
committed
polish the GLError object
1 parent 5009163 commit 58932b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/GLError.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
function GLError (rawError, shortMessage, longMessage) {
2-
this.name = 'GLError'
32
this.shortMessage = shortMessage || ''
43
this.longMessage = longMessage || ''
54
this.rawError = rawError || ''
@@ -9,4 +8,6 @@ function GLError (rawError, shortMessage, longMessage) {
98
this.stack = (new Error()).stack
109
}
1110
GLError.prototype = new Error
11+
GLError.prototype.name = 'GLError'
12+
GLError.prototype.constructor = GLError
1213
module.exports = GLError

0 commit comments

Comments
 (0)