feat: create error service to centralize the handling of errors

This commit is contained in:
Xymorot 2019-10-03 00:55:55 +02:00
parent f4c17b9d36
commit f334b68108
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
// if you would like to add some logging or something similar, start here
export function throwError(error: any): void {
if (error instanceof Error) {
throw error;
} else {
throw new Error(error);
}
}