diff --git a/ParseError.js b/ParseError.js
index <HASH>..<HASH> 100644
--- a/ParseError.js
+++ b/ParseError.js
@@ -1,7 +1,10 @@
 function ParseError(message) {
-    this.message = "TeX parse error: " + message;
+    var self = new Error("TeX parse error: " + message);
+    self.name = "ParseError";
+    self.__proto__ = ParseError.prototype;
+    return self;
 }
 
-ParseError.prototype = Error.prototype;
+ParseError.prototype.__proto__ = Error.prototype;
 
 module.exports = ParseError;
Make ParseErrors differentiable from other Errors

Auditors: alpert