aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/error_utils.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-06 22:26:04 +0800
committerFabio Berger <me@fabioberger.com>2018-06-06 22:26:04 +0800
commitcf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78 (patch)
tree1ab6a8d6b8588707286fc56a632dca9ceca7e7ac /packages/utils/src/error_utils.ts
parentaf1d5fce6ea355b12bf5f63f51ea81ff596f7868 (diff)
downloaddexon-0x-contracts-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.tar.gz
dexon-0x-contracts-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.tar.zst
dexon-0x-contracts-cf8fdd3a701f21bfc3b2ec8397fa65948f5cdc78.zip
Move spawnSwitchErr to @0xproject/utils
Diffstat (limited to 'packages/utils/src/error_utils.ts')
-rw-r--r--packages/utils/src/error_utils.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/utils/src/error_utils.ts b/packages/utils/src/error_utils.ts
new file mode 100644
index 000000000..735d3940b
--- /dev/null
+++ b/packages/utils/src/error_utils.ts
@@ -0,0 +1,5 @@
+export const errorUtils = {
+ spawnSwitchErr(name: string, value: any): Error {
+ return new Error(`Unexpected switch value: ${value} encountered for ${name}`);
+ },
+};