如何使用Ember.RSVP.onerror来报告没有错误处理程序的被拒绝承诺的异常 [英] How to use Ember.RSVP.onerror to report exceptions from rejected promises without error handlers

查看:102
本文介绍了如何使用Ember.RSVP.onerror来报告没有错误处理程序的被拒绝承诺的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚观看了与ember核心的最近小组讨论的视频框架开发人员。



在视频中,小组成员被要求共享一个一般的调试提示 - Tom Dale提出了RSVP onerror处理程序,这使得可以全面报告我们认为这个处理程序会回答我在Stack Overflow上其他地方提出的一些问题(有点混乱)的问题。有没有人知道如何使用这个处理程序或其文档的位置?



文档位于: https://github.com/tildeio/rsvp。 js#错误处理



这是在2013年9月左右添加的。


I just watched this video of a recent panel discussion with the ember-core framework developers.

In the video the panel members are eached asked to share one general debugging tip -- Tom Dale calls out the RSVP onerror handler which makes it possible to globally report exceptions which would have otherwise been swallowed in promises without rejection handlers.

I think this handler will answer a (somewhat confused) question I asked elsewhere on Stack Overflow. Does anyone know how to use this handler or where the docs for it might be?

acceptable promise pattern for 'LOUD' errors?

解决方案

The docs are here: https://github.com/tildeio/rsvp.js#error-handling

This was added around September 2013.

这篇关于如何使用Ember.RSVP.onerror来报告没有错误处理程序的被拒绝承诺的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆