FCF 2.0 development in progress...
> > > >
[News] [Packages API] [Downloads] [Donate to the project] [Contacts]

fcf.stackToString() function

string fcf.stackToString()

Package: fcf-framework-core

File: fcf-framework-core:fcf.js

Available from version: 2.0.2

Converts stack information to string representation

Arguments

string|Array|Error|fcf.Exception a_stack
- Stack information, which can be presented in one of three views.
  • string - string representation obtained from Error.stack
  • Array - An array with stack information received by the fcf.parseStack function.
  • Error|fcf.Exception - Error object.
Result
string
- String representation of the stack

Example: Function application

let stackInfo = fcf.stackToString(new Error()); console.log(stackInfo);

Output:

Object.test (/home/user/development/project/Actions.js:182:37) fcf.Actions. (/home/user/development/project/node_modules/fcf-framework-unitest/unitest.js:615:26) fcf.Actions._execute (/home/user/development/project/node_modules/fcf-framework-core/fcf.js:3125:24) fcf.Actions.then (/home/user/development/project/node_modules/fcf-framework-core/fcf.js:2575:16) Namespace.Unitest._runLocalTests (/home/user/development/project/node_modules/fcf-framework-unitest/unitest.js:611:14) fcf.Actions. (/home/user/development/project/node_modules/fcf-framework-unitest/unitest.js:533:25) fcf.Actions._execute (/home/user/development/project/node_modules/fcf-framework-core/fcf.js:3130:24) Object.complete (/home/user/development/project/node_modules/fcf2/fcf-framework-core/fcf.js:3089:18)