I node debug
my .js file and I catch(error) {
when I console.dir(error)
it just says
[Function: bound ]
What is going on? How do I get the full error object? How do I get the stack trace?
I node debug
my .js file and I catch(error) {
when I console.dir(error)
it just says
[Function: bound ]
What is going on? How do I get the full error object? How do I get the stack trace?
Share Improve this question asked Jun 1, 2016 at 15:34 RichardRichard 16.9k25 gold badges78 silver badges109 bronze badges 2-
Random guess...try
console.dir(error.stack)
– m0meni Commented Jun 1, 2016 at 15:41 - Please provide more information. – Tamas Hegedus Commented Jun 1, 2016 at 15:49
2 Answers
Reset to default 4What is going on?
[Function: bound]
seems to be a bound function object, i.e. the result of a .bind()
call.
How do I get the full error object? How do I get the stack trace?
Not at all. You don't get these if you're not throwing Error
objects. You'll need to find the code that (unwittingly?) throws a function object and fix it.
im taking a shot in the dark here but try
callback(success, err): ....if (err) {return res.serverError(err);}
console.log(err)
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744273017a4566194.html
评论列表(0条)