From d29c0caa715a14214fc755b3cf10ac119cdaf199 Mon Sep 17 00:00:00 2001 From: Michael Reynolds Date: Tue, 6 Feb 2018 12:41:30 +0000 Subject: [PATCH] New: Add more details to some frequent error messages (#962) --- src/namespace.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/namespace.js b/src/namespace.js index ff96aada1..f1fc5f087 100644 --- a/src/namespace.js +++ b/src/namespace.js @@ -203,7 +203,7 @@ Namespace.prototype.get = function get(name) { Namespace.prototype.getEnum = function getEnum(name) { if (this.nested && this.nested[name] instanceof Enum) return this.nested[name].values; - throw Error("no such enum"); + throw Error("no such enum: " + name); }; /** @@ -377,7 +377,7 @@ Namespace.prototype.lookup = function lookup(path, filterTypes, parentAlreadyChe Namespace.prototype.lookupType = function lookupType(path) { var found = this.lookup(path, [ Type ]); if (!found) - throw Error("no such type"); + throw Error("no such type: " + path); return found; };