diff --git a/modules/angular2/src/core/change_detection/abstract_change_detector.ts b/modules/angular2/src/core/change_detection/abstract_change_detector.ts index f3ada379fd..7adaf18a3e 100644 --- a/modules/angular2/src/core/change_detection/abstract_change_detector.ts +++ b/modules/angular2/src/core/change_detection/abstract_change_detector.ts @@ -73,7 +73,7 @@ export class AbstractChangeDetector implements ChangeDetector { handleEvent(eventName: string, elIndex: number, event: any): boolean { if (!this.hydrated()) { - this.throwDehydratedError(); + this.throwDehydratedError(`${this.id} -> ${eventName}`); } try { var locals = new Map(); @@ -130,7 +130,7 @@ export class AbstractChangeDetector implements ChangeDetector { // facilitate error reporting. detectChangesInRecords(throwOnChange: boolean): void { if (!this.hydrated()) { - this.throwDehydratedError(); + this.throwDehydratedError(this.id); } try { this.detectChangesInRecordsInternal(throwOnChange); @@ -362,7 +362,7 @@ export class AbstractChangeDetector implements ChangeDetector { oldValue, newValue, null); } - throwDehydratedError(): void { throw new DehydratedException(); } + throwDehydratedError(detail: string): void { throw new DehydratedException(detail); } private _currentBinding(): BindingTarget { return this.bindingTargets[this.propertyBindingIndex]; diff --git a/modules/angular2/src/core/change_detection/exceptions.ts b/modules/angular2/src/core/change_detection/exceptions.ts index 34e76cd17e..b80ed08b8e 100644 --- a/modules/angular2/src/core/change_detection/exceptions.ts +++ b/modules/angular2/src/core/change_detection/exceptions.ts @@ -91,7 +91,7 @@ export class ChangeDetectionError extends WrappedException { * This is an internal Angular error. */ export class DehydratedException extends BaseException { - constructor() { super('Attempt to use a dehydrated detector.'); } + constructor(details: string) { super(`Attempt to use a dehydrated detector: ${details}`); } } /**