| Index: third_party/pkg/angular/lib/core/exception_handler.dart
|
| diff --git a/third_party/pkg/angular/lib/core/exception_handler.dart b/third_party/pkg/angular/lib/core/exception_handler.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a9d58599653fb39c475cbc15858840a5d403ed37
|
| --- /dev/null
|
| +++ b/third_party/pkg/angular/lib/core/exception_handler.dart
|
| @@ -0,0 +1,23 @@
|
| +part of angular.core;
|
| +
|
| +/**
|
| + * Any uncaught exception in angular expressions is delegated to this service.
|
| + * The default implementation logs exceptions into console.
|
| + *
|
| + * In your application it is expected that this service is overridden with
|
| + * your implementation which can store the exception for later processing.
|
| + */
|
| +@NgInjectableService()
|
| +class ExceptionHandler {
|
| +
|
| + /**
|
| + * Delegate uncaught exception for central error handling.
|
| + *
|
| + * - [error] The error which was caught.
|
| + * - [stack] The stacktrace.
|
| + * - [reason] Optional contextual information for the error.
|
| + */
|
| + call(dynamic error, dynamic stack, [String reason = '']){
|
| + print("$error\n$reason\nSTACKTRACE:\n$stack");
|
| + }
|
| +}
|
|
|