Skip to content

Commit

Permalink
New: Add more details to some frequent error messages (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ar authored and dcodeIO committed Feb 6, 2018
1 parent 8400f87 commit d29c0ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

/**
Expand Down Expand Up @@ -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;
};

Expand Down

0 comments on commit d29c0ca

Please sign in to comment.