javascript - What does [Function: bound ] mean when node debugging? - Stack Overflow

I node debug my .js file and I catch(error) {when I console.dir(error) it just says[Function: bound ]Wh

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
Add a ment  | 

2 Answers 2

Reset to default 4

What 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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信