Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend Error Messages #962

Merged
merged 2 commits into from
Feb 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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