export const enum SmartWeaveErrorType { CONTRACT_NOT_FOUND = 'CONTRACT_NOT_FOUND' } export default class SmartWeaveError extends Error { public readonly type : SmartWeaveErrorType ; public readonly otherInfo : object ; constructor ( type , optional = { } ) { if ( optional . message ) { super ( optional . message ) ; } else { super ( ) ; } this . type = type ; this . otherInfo = optional ; } public getType ( ) { return this . type ; } }