mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-10 05:28:41 +00:00
Make ParseErrors differentiable from other Errors
Auditors: alpert
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user