| OLD | NEW |
| (Empty) | |
| 1 part of angular.core; |
| 2 |
| 3 /** |
| 4 * Any uncaught exception in angular expressions is delegated to this service. |
| 5 * The default implementation logs exceptions into console. |
| 6 * |
| 7 * In your application it is expected that this service is overridden with |
| 8 * your implementation which can store the exception for later processing. |
| 9 */ |
| 10 @NgInjectableService() |
| 11 class ExceptionHandler { |
| 12 |
| 13 /** |
| 14 * Delegate uncaught exception for central error handling. |
| 15 * |
| 16 * - [error] The error which was caught. |
| 17 * - [stack] The stacktrace. |
| 18 * - [reason] Optional contextual information for the error. |
| 19 */ |
| 20 call(dynamic error, dynamic stack, [String reason = '']){ |
| 21 print("$error\n$reason\nSTACKTRACE:\n$stack"); |
| 22 } |
| 23 } |
| OLD | NEW |