SugoiJS provides base abstract exception (error) class which can be extended and used for exceptions handling
SugoiError:{code:number;message:string;data:Array<any>;}
Feel free to extend this class to identify your own errors by:
switch(err.constructor.name){case "MySugoiError"://handled errorbreak;default:throw err;}
Or by:
if( err instanceof MySugoiError){//handled error}else{throw err;}