toString() method from fcf.Exception class
Package: fcf-framework-core
File: fcf-framework-core:fcf.js
Available from version: 2.0.2
Returns an error message
Arguments
- If equal to true , then information about the call stack is added to the error message
- If equal to true , then the message object of the error that caused the creation of the object instance (from the exception property) is added to the error message.
- The language in which the error message will be generated
Result
- Error message
Example:
fcf.addException("TEST_EXCEPTION", "Test exception: @{{value}}@");
let error = new fcf.Exception("TEST_EXCEPTION", {value: 1});
console.log(error.toString(true));
Output:
Test exception: 1
Stack:
Object.test (/home/user/projects/Exception.js:9:13)
fcf.Actions. (/home/user/projects/node_module/fcf-framework-unitest/unitest.js:615:26)
fcf.Actions._execute (/home/user/projects/node_module/fcf-framework-core/fcf.js:3127:24)
fcf.Actions.then (/home/user/projects/node_module/fcf-framework-core/fcf.js:2575:16)
Namespace.Unitest._runLocalTests (/home/user/projects/node_module/fcf-framework-unitest/unitest.js:611:14)
fcf.Actions. (/home/user/projects/node_module/fcf-framework-unitest/unitest.js:533:25)
fcf.Actions._execute (/home/user/projects/node_module/fcf-framework-core/fcf.js:3132:24)
Object.complete (/home/user/project/node_modules/fcf-framework-core/fcf.js:3091:18)
(/home/user/project/node_modules/fcf-framework-core/fcf.js:3146:17)