diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-13 05:01:19 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-13 05:01:19 +0800 |
commit | 39692a8b3fd69e5b37e2de568ee74766840ad4b8 (patch) | |
tree | cc2d1ec295d987a360ce07a5c80723b96b0d1816 /packages/utils | |
parent | 2af6d3f6bc03932f53d199971694c3c0d9441ba8 (diff) | |
parent | 787015f5370718e31c7990446fb1da298ed13e6b (diff) | |
download | dexon-sol-tools-39692a8b3fd69e5b37e2de568ee74766840ad4b8.tar dexon-sol-tools-39692a8b3fd69e5b37e2de568ee74766840ad4b8.tar.gz dexon-sol-tools-39692a8b3fd69e5b37e2de568ee74766840ad4b8.tar.bz2 dexon-sol-tools-39692a8b3fd69e5b37e2de568ee74766840ad4b8.tar.lz dexon-sol-tools-39692a8b3fd69e5b37e2de568ee74766840ad4b8.tar.xz dexon-sol-tools-39692a8b3fd69e5b37e2de568ee74766840ad4b8.tar.zst dexon-sol-tools-39692a8b3fd69e5b37e2de568ee74766840ad4b8.zip |
Merge branch 'v2-prototype' of https://github.com/0xProject/0x-monorepo into feature/website/onboarding-flow-allowances
Diffstat (limited to 'packages/utils')
-rw-r--r-- | packages/utils/CHANGELOG.json | 8 | ||||
-rw-r--r-- | packages/utils/src/error_utils.ts | 5 | ||||
-rw-r--r-- | packages/utils/src/index.ts | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index 616a17d62..339d73e05 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,5 +1,13 @@ [ { + "version": "0.6.3", + "changes": [ + { + "note": "Added errorUtils.spawnSwitchErr" + } + ] + }, + { "timestamp": 1527009133, "version": "0.6.2", "changes": [ 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}`); + }, +}; diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.ts index 709ec93b2..fd102cecb 100644 --- a/packages/utils/src/index.ts +++ b/packages/utils/src/index.ts @@ -7,3 +7,4 @@ export { AbiDecoder } from './abi_decoder'; export { logUtils } from './log_utils'; export { abiUtils } from './abi_utils'; export { NULL_BYTES } from './constants'; +export { errorUtils } from './error_utils'; |