2015-06-16 19:45:00 +02:00

33 lines
1003 B
TypeScript

import {ProtoRecord} from './proto_record';
import {BaseException} from "angular2/src/facade/lang";
export class ExpressionChangedAfterItHasBeenChecked extends BaseException {
message: string;
constructor(proto: ProtoRecord, change: any) {
super();
this.message =
`Expression '${proto.expressionAsString}' has changed after it was checked. ` +
`Previous value: '${change.previousValue}'. Current value: '${change.currentValue}'`;
}
toString(): string { return this.message; }
}
export class ChangeDetectionError extends BaseException {
message: string;
location: string;
constructor(proto: ProtoRecord, public originalException: any) {
super();
this.location = proto.expressionAsString;
this.message = `${this.originalException} in [${this.location}]`;
}
toString(): string { return this.message; }
}
export class DehydratedException extends BaseException {
constructor() { super('Attempt to detect changes on a dehydrated detector.'); }
}