Skip to content

Commit

Permalink
The member 'managerUID' can now be accessed from outside of the error…
Browse files Browse the repository at this point in the history
… class 'ManagerNotFound'
  • Loading branch information
AdrienCastex committed Jun 1, 2017
1 parent 1daac87 commit 6378c48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/Errors.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export declare class ManagerNotFound extends Error {
managerUID: string;
constructor(managerUID: string);
}
export declare class HTTPError extends Error {
Expand Down
4 changes: 3 additions & 1 deletion lib/Errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
var ManagerNotFound = (function (_super) {
__extends(ManagerNotFound, _super);
function ManagerNotFound(managerUID) {
return _super.call(this, 'Cannot find the manager : ' + managerUID) || this;
var _this = _super.call(this, 'Cannot find the manager : ' + managerUID) || this;
_this.managerUID = managerUID;
return _this;
}
return ManagerNotFound;
}(Error));
Expand Down
2 changes: 1 addition & 1 deletion src/Errors.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

export class ManagerNotFound extends Error
{
constructor(managerUID : string)
constructor(public managerUID : string)
{
super('Cannot find the manager : ' + managerUID);
}
Expand Down

0 comments on commit 6378c48

Please sign in to comment.