diff options
Diffstat (limited to 'packages/utils/src')
-rw-r--r-- | packages/utils/src/error_utils.ts | 5 | ||||
-rw-r--r-- | packages/utils/src/index.ts | 1 |
2 files changed, 6 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}`); + }, +}; 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'; |