Comparing version 1.1.12 to 1.1.19
@@ -7,2 +7,3 @@ import { Module } from '../module'; | ||
main(context: ConnectorContext<any>, taskConfig: TaskConfig, coreConfig: any): Promise<any>; | ||
serialiseError(err: Error): any; | ||
} |
@@ -42,3 +42,3 @@ "use strict"; | ||
catch (err) { | ||
context.errors[task.name] = err; | ||
context.errors[task.name] = this.serialiseError(err); | ||
if (task.throwError) { | ||
@@ -56,4 +56,9 @@ throw err; | ||
} | ||
serialiseError(err) { | ||
const jsonErr = {}; | ||
Object.getOwnPropertyNames(err).forEach((key) => { jsonErr[key] = err[key]; }); | ||
return jsonErr; | ||
} | ||
} | ||
exports.Doer = Doer; | ||
//# sourceMappingURL=doer.js.map |
{ | ||
"name": "low", | ||
"version": "1.1.12", | ||
"version": "1.1.19", | ||
"description": "a templating driven low-code framework for rapid systems development", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "87c5071b1087b54916135d9254afaba19f10db7e", | ||
"gitHead": "a110d72271b4642477edcb27e5d2c7bb9f39303e", | ||
"devDependencies": { | ||
@@ -28,0 +28,0 @@ "@types/jest": "^24.9.0", |
@@ -39,3 +39,3 @@ import { Module } from '../module'; | ||
} catch(err) { | ||
context.errors[task.name] = err; | ||
context.errors[task.name] = this.serialiseError(err); | ||
if (task.throwError) { | ||
@@ -51,2 +51,8 @@ throw err; | ||
} | ||
serialiseError(err: Error) { | ||
const jsonErr: any = {}; | ||
Object.getOwnPropertyNames(err).forEach((key: any) => { jsonErr[key] = (err as any)[key]; } ); | ||
return jsonErr; | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
483181
4335