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