angular/modules/angular2/src/facade/exceptions.dart
Vikram Subramanian 9936e347ff chore(build): Remove circular dependency in Angular 2 ES5 output.
Remove couple of circular dependency between modules in Angular 2 ES5 output caused by exception_handler.ts and router_providers.ts.

Fix the build/checkCircularDependency gulp task to call madge properly to detect the circular deps.

Closes #7287
2016-03-03 17:42:33 +00:00

51 lines
1001 B
Dart

library angular.core.facade.exceptions;
import 'base_wrapped_exception.dart';
import 'exception_handler.dart';
export 'exception_handler.dart';
class BaseException extends Error {
final String _message;
BaseException([this._message]);
String get message => _message;
String toString() {
return this.message;
}
}
class WrappedException extends BaseWrappedException {
final dynamic _context;
final String _wrapperMessage;
final originalException;
final originalStack;
WrappedException(
[this._wrapperMessage,
this.originalException,
this.originalStack,
this._context]);
String get message {
return ExceptionHandler.exceptionToString(this);
}
String toString() {
return this.message;
}
dynamic get context => _context;
String get wrapperMessage => _wrapperMessage;
}
Error makeTypeError([String message = ""]) {
return new BaseException(message);
}
dynamic unimplemented() {
throw new BaseException('unimplemented');
}