Skip to content

Commit deb043f

Browse files
committed
added note for exception handler catcher
1 parent 5997b33 commit deb043f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,8 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
14571457
14581458
*Why?*: Provides a consistent way to handle uncaught AngularJS exceptions for development-time or run-time.
14591459
1460+
- Note: Another option is to override the service instead of using a decorator. This is a fine option, but if you want to keep the default behavior and extend it a decorator is recommended.
1461+
14601462
```javascript
14611463
/* recommended */
14621464
angular
@@ -1493,6 +1495,8 @@ While this guide explains the *what*, *why* and *how*, I find it helpful to see
14931495
14941496
*Why?*: Provides a consistent way to catch exceptions that may be thrown in your code (e.g. during XHR calls or promise failures).
14951497
1498+
- Note: The exception catcher is good for catching and reacting to specific exceptions from calls that you know may throw one. For example, when making an XHR call to retrieve data from a remote web service and you want to catch any exceptions from that service and react uniquely.
1499+
14961500
```javascript
14971501
/* recommended */
14981502
angular

0 commit comments

Comments
 (0)