| 1 | "use strict"; |
| 2 | |
| 3 | var classes = require("./utils/classes"); |
| 4 | |
| 5 | /* Thrown when the grammar contains an error. */ |
| 6 | function GrammarError(message, location) { |
| 7 | this.name = "GrammarError"; |
| 8 | this.message = message; |
| 9 | this.location = location; |
| 10 | |
| 11 | if (typeof Error.captureStackTrace === "function") { |
| 12 | Error.captureStackTrace(this, GrammarError); |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | classes.subclass(GrammarError, Error); |
| 17 | |
| 18 | module.exports = GrammarError; |