diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js index 94f9a7845..cfa60ada6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/SingleMarketSensorBot.js @@ -551,7 +551,17 @@ function processStopped() { if (TS.projects.superalgos.globals.taskVariables.FATAL_ERROR_MESSAGE !== undefined) { - TS.projects.superalgos.functionLibraries.processFunctions.processError(TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_KEY, undefined, "An unexpected error caused the Process to stop.") + TS.projects.superalgos.functionLibraries.processFunctions.processError + ( + TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_KEY, + undefined, + "An unexpected error caused the Process to stop.", + { + project: 'Superalgos', + category: 'Topic', + type: 'TS Process Error - Unexpected Error' + } + ) } else { TS.projects.superalgos.globals.taskConstants.EVENT_SERVER_CLIENT_MODULE_OBJECT.raiseEvent(TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_KEY, 'Stopped') } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/SingleMarketTradingBot.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/SingleMarketTradingBot.js index 3b9fd15bf..372b0967c 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/SingleMarketTradingBot.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/SingleMarketTradingBot.js @@ -681,7 +681,17 @@ function processStopped() { if (TS.projects.superalgos.globals.taskVariables.FATAL_ERROR_MESSAGE !== undefined) { - TS.projects.superalgos.functionLibraries.processFunctions.processError(TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_KEY, undefined, "An unexpected error caused the Process to stop.") + TS.projects.superalgos.functionLibraries.processFunctions.processError + ( + TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_KEY, + undefined, + "An unexpected error caused the Process to stop.", + { + project: 'Superalgos', + category: 'Topic', + type: 'TS Process Error - Unexpected Error' + } + ) } else { TS.projects.superalgos.globals.taskConstants.EVENT_SERVER_CLIENT_MODULE_OBJECT.raiseEvent(TS.projects.superalgos.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).PROCESS_KEY, 'Stopped') } diff --git a/Projects/Superalgos/TS/Function-Libraries/NodeJSFunctions.js b/Projects/Superalgos/TS/Function-Libraries/NodeJSFunctions.js index fdf919982..4648486e2 100644 --- a/Projects/Superalgos/TS/Function-Libraries/NodeJSFunctions.js +++ b/Projects/Superalgos/TS/Function-Libraries/NodeJSFunctions.js @@ -10,7 +10,15 @@ exports.newSuperalgosFunctionLibrariesNodeJSFunctions = function () { function exitProcess() { if (TS.projects.superalgos.globals.taskVariables.FATAL_ERROR_MESSAGE !== undefined) { - TS.projects.superalgos.functionLibraries.taskFunctions.taskError(undefined, "An unexpected error caused the Task to stop. " + TS.projects.superalgos.globals.taskVariables.FATAL_ERROR_MESSAGE) + TS.projects.superalgos.functionLibraries.taskFunctions.taskError( + undefined, + "An unexpected error caused the Task to stop. " + TS.projects.superalgos.globals.taskVariables.FATAL_ERROR_MESSAGE, + { + project: 'Superalgos', + category: 'Topic', + type: 'TS Task Error - Unexpected Error' + } + ) } if (isNodeJsProcessShuttingDown === true) { return } diff --git a/Projects/Superalgos/TS/Function-Libraries/TaskFunctions.js b/Projects/Superalgos/TS/Function-Libraries/TaskFunctions.js index d431bc7bb..6fd9cdabb 100644 --- a/Projects/Superalgos/TS/Function-Libraries/TaskFunctions.js +++ b/Projects/Superalgos/TS/Function-Libraries/TaskFunctions.js @@ -7,14 +7,15 @@ exports.newSuperalgosFunctionLibrariesTaskFunctions = function () { return thisObject - function taskError(node, errorMessage) { + function taskError(node, errorMessage, docs) { let event if (node !== undefined) { event = { nodeName: node.name, nodeType: node.type, nodeId: node.id, - errorMessage: errorMessage + errorMessage: errorMessage, + docs: docs } } else { event = {