Skip to content

Commit

Permalink
feat(interceptors): update error handling, add @thi.ng/api dep
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Mar 21, 2018
1 parent 0cfc227 commit 501d56f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions packages/interceptors/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@thi.ng/interceptors",
"version": "1.0.5",
"description": "Interceptor based event, side effect & immutable state handling",
"description": "Interceptor based event bus, side effect & immutable state handling",
"main": "./index.js",
"typings": "./index.d.ts",
"repository": "https://github.com/thi-ng/umbrella",
Expand All @@ -24,6 +24,7 @@
"webpack": "^3.11.0"
},
"dependencies": {
"@thi.ng/api": "^2.0.4",
"@thi.ng/atom": "^1.1.0",
"@thi.ng/paths": "^1.1.1"
},
Expand All @@ -34,4 +35,4 @@
"publishConfig": {
"access": "public"
}
}
}
3 changes: 2 additions & 1 deletion packages/interceptors/src/event-bus.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IObjectOf, IDeref } from "@thi.ng/api/api";
import { illegalArgs } from "@thi.ng/api/error";
import { IAtom } from "@thi.ng/atom/api";
import { Atom } from "@thi.ng/atom/atom";
import { isArray } from "@thi.ng/checks/is-array";
Expand Down Expand Up @@ -207,7 +208,7 @@ export class StatelessEventBus implements
}
this.handlers[id] = iceps;
} else {
throw new Error(`no handlers in spec for ID: ${id}`);
illegalArgs(`no handlers in spec for ID: ${id}`);
}
}

Expand Down

0 comments on commit 501d56f

Please sign in to comment.