阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js domain.add

      Node.js domain.add(emitter)

      • emitter < EventEmitter> |emitter or timer to be added to the domain

      Explicitly adds an emitter to the domain. If any event handlers called by the emitter throw an error, or if the emitter emits an ‘error’ event, it will be routed to the domain’s ‘error’ event, just like with implicit binding.

      This also works with timers that are returned from setInterval() and setTimeout(). If their callback function throws, it will be caught by the domain ‘error’ handler.

      If the Timer or EventEmitter was already bound to a domain, it is removed from that one, and bound to this one instead.


      更多内容请参考:Node.js domain,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录