From 428fe294cfaaaa9adaa3ea15a1621d110e734fe7 Mon Sep 17 00:00:00 2001 From: David Majda Date: Sun, 28 Oct 2012 18:57:45 +0100 Subject: [PATCH] Change |PEG.GrammarError| name Change the value of the |name| property of |PEG.GrammarError| instances from "PEG.GrammarError" to just "GrammarError". This better reflects the fact that PEG.js can get required under different name than "PEG". --- src/peg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peg.js b/src/peg.js index af591a7..fd6522f 100644 --- a/src/peg.js +++ b/src/peg.js @@ -31,7 +31,7 @@ var PEG = { /* Thrown when the grammar contains an error. */ PEG.GrammarError = function(message) { - this.name = "PEG.GrammarError"; + this.name = "GrammarError"; this.message = message; };