fix(exception_handler): fix error messages of wrapped exceptions
Closes #4117
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import {isPresent, isBlank, BaseException, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {isPresent, isBlank, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ChangeDetectionUtil} from './change_detection_util';
|
||||
import {ChangeDetectorRef} from './change_detector_ref';
|
||||
|
@ -13,14 +13,7 @@ import {
|
||||
} from './interfaces';
|
||||
import {Injector, Inject, Injectable, OpaqueToken, Optional, Binding} from 'angular2/src/core/di';
|
||||
import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {
|
||||
CONST,
|
||||
CONST_EXPR,
|
||||
isPresent,
|
||||
BaseException,
|
||||
assertionsEnabled
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
|
||||
import {CONST, CONST_EXPR, isPresent, assertionsEnabled} from 'angular2/src/core/facade/lang';
|
||||
export * from './parser/ast';
|
||||
|
||||
export {Lexer} from './parser/lexer';
|
||||
|
@ -1,10 +1,5 @@
|
||||
import {
|
||||
BaseException,
|
||||
Type,
|
||||
isBlank,
|
||||
isPresent,
|
||||
StringWrapper
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
import {Type, isBlank, isPresent, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
|
||||
import {AbstractChangeDetector} from './abstract_change_detector';
|
||||
@ -70,7 +65,7 @@ export class ChangeDetectorJITGenerator {
|
||||
${this.generateSource()}
|
||||
return function(dispatcher) {
|
||||
return new ${this.typeName}(dispatcher);
|
||||
}
|
||||
}
|
||||
`;
|
||||
return new Function(this.abstractChangeDetectorVarName, this.changeDetectionUtilVarName,
|
||||
factorySource)(AbstractChangeDetector, ChangeDetectionUtil);
|
||||
|
@ -1,11 +1,5 @@
|
||||
import {
|
||||
CONST_EXPR,
|
||||
isPresent,
|
||||
isBlank,
|
||||
BaseException,
|
||||
Type,
|
||||
StringWrapper
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
import {CONST_EXPR, isPresent, isBlank, Type, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ProtoRecord} from './proto_record';
|
||||
import {ChangeDetectionStrategy, isDefaultChangeDetectionStrategy} from './constants';
|
||||
|
@ -1,17 +1,12 @@
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {
|
||||
BaseException,
|
||||
Json,
|
||||
StringWrapper,
|
||||
isPresent,
|
||||
isBlank
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
import {Json, StringWrapper, isPresent, isBlank} from 'angular2/src/core/facade/lang';
|
||||
import {CodegenNameUtil} from './codegen_name_util';
|
||||
import {codify, combineGeneratedStrings, rawString} from './codegen_facade';
|
||||
import {ProtoRecord, RecordType} from './proto_record';
|
||||
import {BindingTarget} from './binding_record';
|
||||
import {DirectiveRecord} from './directive_record';
|
||||
import {ChangeDetectionStrategy} from './constants';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
|
||||
/**
|
||||
* Class responsible for providing change detection logic for chagne detector classes.
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {CONST, BaseException} from 'angular2/src/core/facade/lang';
|
||||
import {CONST} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {
|
||||
isListLikeIterable,
|
||||
iterateListLike,
|
||||
|
@ -1,12 +1,6 @@
|
||||
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {
|
||||
stringify,
|
||||
looseIdentical,
|
||||
isJsObject,
|
||||
CONST,
|
||||
isBlank,
|
||||
BaseException
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
import {stringify, looseIdentical, isJsObject, CONST, isBlank} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ChangeDetectorRef} from '../change_detector_ref';
|
||||
import {KeyValueDiffer, KeyValueDifferFactory} from '../differs/keyvalue_differs';
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {isBlank, isPresent, BaseException, CONST} from 'angular2/src/core/facade/lang';
|
||||
import {isBlank, isPresent, CONST} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ChangeDetectorRef} from '../change_detector_ref';
|
||||
import {Binding, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {isBlank, isPresent, BaseException, CONST} from 'angular2/src/core/facade/lang';
|
||||
import {isBlank, isPresent, CONST} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {ChangeDetectorRef} from '../change_detector_ref';
|
||||
import {Binding, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di';
|
||||
|
@ -1,10 +1,5 @@
|
||||
import {
|
||||
isPresent,
|
||||
isBlank,
|
||||
BaseException,
|
||||
FunctionWrapper,
|
||||
StringWrapper
|
||||
} from 'angular2/src/core/facade/lang';
|
||||
import {isPresent, isBlank, FunctionWrapper, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
|
||||
import {AbstractChangeDetector} from './abstract_change_detector';
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {BaseException} from "angular2/src/core/facade/lang";
|
||||
import {BaseException, WrappedException} from "angular2/src/core/facade/exceptions";
|
||||
|
||||
/**
|
||||
* An error thrown if application changes model breaking the top-down data flow.
|
||||
@ -21,7 +21,7 @@ export class ExpressionChangedAfterItHasBeenCheckedException extends BaseExcepti
|
||||
*
|
||||
* This error wraps the original exception, this is done to attach expression location information.
|
||||
*/
|
||||
export class ChangeDetectionError extends BaseException {
|
||||
export class ChangeDetectionError extends WrappedException {
|
||||
/**
|
||||
* Location of the expression.
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {isBlank, isPresent, FunctionWrapper, BaseException} from "angular2/src/core/facade/lang";
|
||||
import {isBlank, isPresent, FunctionWrapper} from "angular2/src/core/facade/lang";
|
||||
import {Map, ListWrapper, StringMapWrapper} from "angular2/src/core/facade/collection";
|
||||
|
||||
export class AST {
|
||||
|
@ -1,12 +1,7 @@
|
||||
import {Injectable} from 'angular2/src/core/di/decorators';
|
||||
import {ListWrapper, SetWrapper} from "angular2/src/core/facade/collection";
|
||||
import {
|
||||
NumberWrapper,
|
||||
StringJoiner,
|
||||
StringWrapper,
|
||||
BaseException,
|
||||
isPresent
|
||||
} from "angular2/src/core/facade/lang";
|
||||
import {NumberWrapper, StringJoiner, StringWrapper, isPresent} from "angular2/src/core/facade/lang";
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
|
||||
export enum TokenType {
|
||||
Character,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {isPresent, BaseException} from 'angular2/src/core/facade/lang';
|
||||
import {isPresent} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
|
||||
|
||||
export class Locals {
|
||||
|
@ -1,5 +1,6 @@
|
||||
import {Injectable} from 'angular2/src/core/di/decorators';
|
||||
import {isBlank, isPresent, BaseException, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {isBlank, isPresent, StringWrapper} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper} from 'angular2/src/core/facade/collection';
|
||||
import {
|
||||
Lexer,
|
||||
@ -51,8 +52,7 @@ var INTERPOLATION_REGEXP = /\{\{(.*?)\}\}/g;
|
||||
|
||||
class ParseException extends BaseException {
|
||||
constructor(message: string, input: string, errLocation: string, ctxLocation?: any) {
|
||||
super(`Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`, null, null,
|
||||
ctxLocation);
|
||||
super(`Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
import {ABSTRACT, BaseException, CONST, Type} from 'angular2/src/core/facade/lang';
|
||||
|
||||
/**
|
||||
* To create a Pipe, you must implement this interface.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {BaseException} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
|
||||
import {ProtoChangeDetector, ChangeDetector} from './interfaces';
|
||||
import {coalesce} from './coalesce';
|
||||
|
@ -1,4 +1,5 @@
|
||||
import {BaseException, Type, isBlank, isPresent, isString} from 'angular2/src/core/facade/lang';
|
||||
import {Type, isBlank, isPresent, isString} from 'angular2/src/core/facade/lang';
|
||||
import {BaseException} from 'angular2/src/core/facade/exceptions';
|
||||
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
|
||||
|
||||
import {
|
||||
|
Reference in New Issue
Block a user