Wizard-SDK, a TypeScript software development kit, is designed to visualize diverse protocol EIP-712 messages and simulate transactions that users sign daily in the web3.0 environment.
added WizardError instance to define custom errors
the custom error can be identified in a catch block by checking the error name:
error.name === "WizardError"
This will allow more flexible error handling by application, The custom error WizardError is meant for soft errors, for example unsupported chain, unexpected protocol strategy change..etc
The normal Error is meant for internal errors (assert statements)
added WizardError instance to define custom errors
the custom error can be identified in a catch block by checking the error name:
This will allow more flexible error handling by application, The custom error
WizardError
is meant for soft errors, for example unsupported chain, unexpected protocol strategy change..etcThe normal
Error
is meant for internal errors (assert statements)For more details see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors