0.0.9 • Published 9 years ago

node-stacktrace v0.0.9

Weekly downloads
48
License
-
Repository
github
Last release
9 years ago

StackTrace

Parse stack from error and help to manipulate it

create(error)

Returns a stacktrace from error using error.stack.

stackTrace properties

var error = new Error();
var stackTrace = require('node-stacktrace').create(error);

stackTrace.callSites; // an array of callSite object representing the stack
stackTrace.fileName; // filename of the first callSite : __filename
stackTrace.lineNumber; // line number of the first callSite : 1
stackTrace.columnNumber; // columnnumber of the first callSite : 12
stackTrace.toString(); // todo

install(error)

Returns a stacktrace from error & install some properties on error

installed properties on error

var error = new Error();
var stackTrace = require('node-stacktrace').install(error);

error.stackTrace; // stackTrace
error.fileName; // stackTrace.fileName
error.lineNumber; // stackTrace.lineNumber
error.columnNumber; // stackTrace.columnNumber
error.toString(); // todo
0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago