0.0.9 • Published 10 years ago

node-stacktrace v0.0.9

Weekly downloads
48
License
-
Repository
github
Last release
10 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

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago