@5minds/processcube_engine_sdk
Advanced tools
Comparing version 4.0.0-develop-48de56-llc80ce4 to 4.0.0-develop-5d978a-lll6tx65
@@ -40,3 +40,4 @@ define(["require", "exports", "./index"], function (require, exports, errorClasses) { | ||
const callStackUndefined = errorInfo.callStack === undefined; | ||
const structureIsIncorrect = errorClassUndefined || codeUndefined || callStackUndefined; | ||
const errorTypeUndefined = errorInfo.errorType === undefined; | ||
const structureIsIncorrect = errorClassUndefined || codeUndefined || callStackUndefined || errorTypeUndefined; | ||
if (structureIsIncorrect) { | ||
@@ -61,2 +62,4 @@ throw new Error('Error while deserializing error: Serialized object has an incompatible structure.'); | ||
additionalInformation: this.additionalInformation, | ||
errorType: 'Error', | ||
...this, | ||
}); | ||
@@ -63,0 +66,0 @@ } |
@@ -70,3 +70,7 @@ define(["require", "exports", "./DataModels/ProcessInstance/BpmnError", "./Errors/BaseError"], function (require, exports, BpmnError_1, BaseError_1) { | ||
const deserializedValue = tryParse(stringifiedError, reviverFunction); | ||
const notAnErrorOrEmpty = deserializedValue == undefined || deserializedValue.name == undefined || deserializedValue.message == undefined || deserializedValue.stack == undefined; | ||
const notAnErrorOrEmpty = deserializedValue == undefined || | ||
deserializedValue.name == undefined || | ||
deserializedValue.message == undefined || | ||
deserializedValue.stack == undefined || | ||
deserializedValue.errorType == undefined; | ||
if (notAnErrorOrEmpty) { | ||
@@ -80,2 +84,7 @@ return deserializedValue; | ||
} | ||
Object.keys(deserializedValue).forEach((key) => { | ||
if (!error[key]) { | ||
error[key] = deserializedValue[key]; | ||
} | ||
}); | ||
return error; | ||
@@ -87,2 +96,7 @@ } | ||
error.name = deserializedValue.name; | ||
Object.keys(deserializedValue).forEach((key) => { | ||
if (!error[key]) { | ||
error[key] = deserializedValue[key]; | ||
} | ||
}); | ||
return error; | ||
@@ -89,0 +103,0 @@ } |
@@ -40,3 +40,4 @@ "use strict"; | ||
const callStackUndefined = errorInfo.callStack === undefined; | ||
const structureIsIncorrect = errorClassUndefined || codeUndefined || callStackUndefined; | ||
const errorTypeUndefined = errorInfo.errorType === undefined; | ||
const structureIsIncorrect = errorClassUndefined || codeUndefined || callStackUndefined || errorTypeUndefined; | ||
if (structureIsIncorrect) { | ||
@@ -61,2 +62,4 @@ throw new Error('Error while deserializing error: Serialized object has an incompatible structure.'); | ||
additionalInformation: this.additionalInformation, | ||
errorType: 'Error', | ||
...this, | ||
}); | ||
@@ -63,0 +66,0 @@ } |
@@ -71,3 +71,7 @@ "use strict"; | ||
const deserializedValue = tryParse(stringifiedError, reviverFunction); | ||
const notAnErrorOrEmpty = deserializedValue == undefined || deserializedValue.name == undefined || deserializedValue.message == undefined || deserializedValue.stack == undefined; | ||
const notAnErrorOrEmpty = deserializedValue == undefined || | ||
deserializedValue.name == undefined || | ||
deserializedValue.message == undefined || | ||
deserializedValue.stack == undefined || | ||
deserializedValue.errorType == undefined; | ||
if (notAnErrorOrEmpty) { | ||
@@ -81,2 +85,7 @@ return deserializedValue; | ||
} | ||
Object.keys(deserializedValue).forEach((key) => { | ||
if (!error[key]) { | ||
error[key] = deserializedValue[key]; | ||
} | ||
}); | ||
return error; | ||
@@ -88,2 +97,7 @@ } | ||
error.name = deserializedValue.name; | ||
Object.keys(deserializedValue).forEach((key) => { | ||
if (!error[key]) { | ||
error[key] = deserializedValue[key]; | ||
} | ||
}); | ||
return error; | ||
@@ -90,0 +104,0 @@ } |
{ | ||
"name": "@5minds/processcube_engine_sdk", | ||
"version": "4.0.0-develop-48de56-llc80ce4", | ||
"version": "4.0.0-develop-5d978a-lll6tx65", | ||
"description": "Software development kit for the Engine.", | ||
@@ -5,0 +5,0 @@ "main": "dist/commonjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1188053
18707
20
1522