This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change 28
28
* exceptions fail hard when they happen, instead of just logging to the console.
29
29
*
30
30
* <hr />
31
- * Note, that code executed outside of the Angular context does not delegate exceptions to the
32
- * {@link ng.$exceptionHandler $exceptionHandler}. Some common such cases include functions invoked
33
- * by third party libraries and callbacks associated with XHR, setTimeout/setInterval and browser
34
- * DOM events (including callbacks registered using jqLite's/jQuery's `on`/`bind` methods).
35
- * For some of those cases, Angular provides native wrappers that transparently manage the $digest
36
- * cycle and delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler} (e.g.
37
- * {@link ng.$http $http} for XHR, {@link ng.$timeout $timeout}/{@link ng.$interval $interval } for
38
- * setTimeout/setInterval). For the rest, you can explicitly ensure that the code is excecuted
39
- * inside of the Angular context, by wrapping it in
40
- * {@link ng.$rootScope.Scope#$apply scope.$apply() }.
31
+ * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
32
+ * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
33
+ * (unless executed during a digest).
34
+ *
35
+ * If you wish, you can manually delegate exceptions, e.g.
36
+ * `try { ... } catch(e) { $exceptionHandler(e); }`
41
37
*
42
38
* @param {Error } exception Exception associated with the error.
43
39
* @param {string= } cause optional information about the context in which
You can’t perform that action at this time.
0 commit comments