fix(exception_handler): fix error messages of wrapped exceptions

Closes #4117
This commit is contained in:
vsavkin 2015-09-10 15:25:36 -07:00 committed by Victor Savkin
parent 892d2b9652
commit f6cc573687
137 changed files with 339 additions and 349 deletions

View File

@ -3,13 +3,12 @@ import {
RegExpWrapper, RegExpWrapper,
isPresent, isPresent,
StringWrapper, StringWrapper,
BaseException,
StringJoiner, StringJoiner,
stringify, stringify,
assertionsEnabled, assertionsEnabled,
isBlank isBlank
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {Parser, AST, ASTWithSource} from 'angular2/src/core/change_detection/change_detection'; import {Parser, AST, ASTWithSource} from 'angular2/src/core/change_detection/change_detection';
import {TemplateBinding} from 'angular2/src/core/change_detection/parser/ast'; import {TemplateBinding} from 'angular2/src/core/change_detection/parser/ast';

View File

@ -6,11 +6,15 @@ import {
Type, Type,
isBlank, isBlank,
isPresent, isPresent,
BaseException,
assertionsEnabled, assertionsEnabled,
print, print,
stringify stringify
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {
BaseException,
WrappedException,
ExceptionHandler
} from 'angular2/src/core/facade/exceptions';
import {BrowserDomAdapter} from 'angular2/src/core/dom/browser_adapter'; import {BrowserDomAdapter} from 'angular2/src/core/dom/browser_adapter';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {Compiler, CompilerCache} from './compiler/compiler'; import {Compiler, CompilerCache} from './compiler/compiler';
@ -27,7 +31,6 @@ import {
KeyValueDiffers, KeyValueDiffers,
defaultKeyValueDiffers defaultKeyValueDiffers
} from 'angular2/src/core/change_detection/change_detection'; } from 'angular2/src/core/change_detection/change_detection';
import {ExceptionHandler} from 'angular2/src/core/facade/exception_handler';
import {ViewLoader} from 'angular2/src/core/render/dom/compiler/view_loader'; import {ViewLoader} from 'angular2/src/core/render/dom/compiler/view_loader';
import {StyleUrlResolver} from 'angular2/src/core/render/dom/compiler/style_url_resolver'; import {StyleUrlResolver} from 'angular2/src/core/render/dom/compiler/style_url_resolver';
import {StyleInliner} from 'angular2/src/core/render/dom/compiler/style_inliner'; import {StyleInliner} from 'angular2/src/core/render/dom/compiler/style_inliner';

View File

@ -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 {ListWrapper} from 'angular2/src/core/facade/collection';
import {ChangeDetectionUtil} from './change_detection_util'; import {ChangeDetectionUtil} from './change_detection_util';
import {ChangeDetectorRef} from './change_detector_ref'; import {ChangeDetectorRef} from './change_detector_ref';

View File

@ -13,14 +13,7 @@ import {
} from './interfaces'; } from './interfaces';
import {Injector, Inject, Injectable, OpaqueToken, Optional, Binding} from 'angular2/src/core/di'; import {Injector, Inject, Injectable, OpaqueToken, Optional, Binding} from 'angular2/src/core/di';
import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
import { import {CONST, CONST_EXPR, isPresent, assertionsEnabled} from 'angular2/src/core/facade/lang';
CONST,
CONST_EXPR,
isPresent,
BaseException,
assertionsEnabled
} from 'angular2/src/core/facade/lang';
export * from './parser/ast'; export * from './parser/ast';
export {Lexer} from './parser/lexer'; export {Lexer} from './parser/lexer';

View File

@ -1,10 +1,5 @@
import { import {Type, isBlank, isPresent, StringWrapper} from 'angular2/src/core/facade/lang';
BaseException, import {BaseException} from 'angular2/src/core/facade/exceptions';
Type,
isBlank,
isPresent,
StringWrapper
} from 'angular2/src/core/facade/lang';
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {AbstractChangeDetector} from './abstract_change_detector'; import {AbstractChangeDetector} from './abstract_change_detector';

View File

@ -1,11 +1,5 @@
import { import {CONST_EXPR, isPresent, isBlank, Type, StringWrapper} from 'angular2/src/core/facade/lang';
CONST_EXPR, import {BaseException} from 'angular2/src/core/facade/exceptions';
isPresent,
isBlank,
BaseException,
Type,
StringWrapper
} from 'angular2/src/core/facade/lang';
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {ProtoRecord} from './proto_record'; import {ProtoRecord} from './proto_record';
import {ChangeDetectionStrategy, isDefaultChangeDetectionStrategy} from './constants'; import {ChangeDetectionStrategy, isDefaultChangeDetectionStrategy} from './constants';

View File

@ -1,17 +1,12 @@
import {ListWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper} from 'angular2/src/core/facade/collection';
import { import {Json, StringWrapper, isPresent, isBlank} from 'angular2/src/core/facade/lang';
BaseException,
Json,
StringWrapper,
isPresent,
isBlank
} from 'angular2/src/core/facade/lang';
import {CodegenNameUtil} from './codegen_name_util'; import {CodegenNameUtil} from './codegen_name_util';
import {codify, combineGeneratedStrings, rawString} from './codegen_facade'; import {codify, combineGeneratedStrings, rawString} from './codegen_facade';
import {ProtoRecord, RecordType} from './proto_record'; import {ProtoRecord, RecordType} from './proto_record';
import {BindingTarget} from './binding_record'; import {BindingTarget} from './binding_record';
import {DirectiveRecord} from './directive_record'; import {DirectiveRecord} from './directive_record';
import {ChangeDetectionStrategy} from './constants'; import {ChangeDetectionStrategy} from './constants';
import {BaseException} from 'angular2/src/core/facade/exceptions';
/** /**
* Class responsible for providing change detection logic for chagne detector classes. * Class responsible for providing change detection logic for chagne detector classes.

View File

@ -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 { import {
isListLikeIterable, isListLikeIterable,
iterateListLike, iterateListLike,

View File

@ -1,12 +1,6 @@
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import { import {stringify, looseIdentical, isJsObject, CONST, isBlank} from 'angular2/src/core/facade/lang';
stringify, import {BaseException} from 'angular2/src/core/facade/exceptions';
looseIdentical,
isJsObject,
CONST,
isBlank,
BaseException
} from 'angular2/src/core/facade/lang';
import {ChangeDetectorRef} from '../change_detector_ref'; import {ChangeDetectorRef} from '../change_detector_ref';
import {KeyValueDiffer, KeyValueDifferFactory} from '../differs/keyvalue_differs'; import {KeyValueDiffer, KeyValueDifferFactory} from '../differs/keyvalue_differs';

View File

@ -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 {ListWrapper} from 'angular2/src/core/facade/collection';
import {ChangeDetectorRef} from '../change_detector_ref'; import {ChangeDetectorRef} from '../change_detector_ref';
import {Binding, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di'; import {Binding, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di';

View File

@ -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 {ListWrapper} from 'angular2/src/core/facade/collection';
import {ChangeDetectorRef} from '../change_detector_ref'; import {ChangeDetectorRef} from '../change_detector_ref';
import {Binding, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di'; import {Binding, SkipSelfMetadata, OptionalMetadata, Injectable} from 'angular2/src/core/di';

View File

@ -1,10 +1,5 @@
import { import {isPresent, isBlank, FunctionWrapper, StringWrapper} from 'angular2/src/core/facade/lang';
isPresent, import {BaseException} from 'angular2/src/core/facade/exceptions';
isBlank,
BaseException,
FunctionWrapper,
StringWrapper
} from 'angular2/src/core/facade/lang';
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {AbstractChangeDetector} from './abstract_change_detector'; import {AbstractChangeDetector} from './abstract_change_detector';

View File

@ -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. * 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. * 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. * Location of the expression.
*/ */

View File

@ -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"; import {Map, ListWrapper, StringMapWrapper} from "angular2/src/core/facade/collection";
export class AST { export class AST {

View File

@ -1,12 +1,7 @@
import {Injectable} from 'angular2/src/core/di/decorators'; import {Injectable} from 'angular2/src/core/di/decorators';
import {ListWrapper, SetWrapper} from "angular2/src/core/facade/collection"; import {ListWrapper, SetWrapper} from "angular2/src/core/facade/collection";
import { import {NumberWrapper, StringJoiner, StringWrapper, isPresent} from "angular2/src/core/facade/lang";
NumberWrapper, import {BaseException} from 'angular2/src/core/facade/exceptions';
StringJoiner,
StringWrapper,
BaseException,
isPresent
} from "angular2/src/core/facade/lang";
export enum TokenType { export enum TokenType {
Character, Character,

View File

@ -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'; import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
export class Locals { export class Locals {

View File

@ -1,5 +1,6 @@
import {Injectable} from 'angular2/src/core/di/decorators'; 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 {ListWrapper} from 'angular2/src/core/facade/collection';
import { import {
Lexer, Lexer,
@ -51,8 +52,7 @@ var INTERPOLATION_REGEXP = /\{\{(.*?)\}\}/g;
class ParseException extends BaseException { class ParseException extends BaseException {
constructor(message: string, input: string, errLocation: string, ctxLocation?: any) { constructor(message: string, input: string, errLocation: string, ctxLocation?: any) {
super(`Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`, null, null, super(`Parser Error: ${message} ${errLocation} [${input}] in ${ctxLocation}`);
ctxLocation);
} }
} }

View File

@ -1,5 +1,3 @@
import {ABSTRACT, BaseException, CONST, Type} from 'angular2/src/core/facade/lang';
/** /**
* To create a Pipe, you must implement this interface. * To create a Pipe, you must implement this interface.
* *

View File

@ -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 {ProtoChangeDetector, ChangeDetector} from './interfaces';
import {coalesce} from './coalesce'; import {coalesce} from './coalesce';

View File

@ -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 {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import { import {

View File

@ -5,12 +5,12 @@ import {
isBlank, isBlank,
isType, isType,
isPresent, isPresent,
BaseException,
normalizeBlank, normalizeBlank,
stringify, stringify,
isArray, isArray,
isPromise isPromise
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async'; import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async';
import {ListWrapper, Map, MapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, Map, MapWrapper} from 'angular2/src/core/facade/collection';

View File

@ -1,5 +1,6 @@
import {resolveForwardRef, Injectable} from 'angular2/src/core/di'; import {resolveForwardRef, Injectable} from 'angular2/src/core/di';
import {Type, isPresent, BaseException, stringify} from 'angular2/src/core/facade/lang'; import {Type, isPresent, stringify} from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {ListWrapper, StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
import { import {
DirectiveMetadata, DirectiveMetadata,

View File

@ -1,6 +1,6 @@
import {Key, Injector, ResolvedBinding, Binding, bind, Injectable} from 'angular2/src/core/di'; import {Key, Injector, ResolvedBinding, Binding, bind, Injectable} from 'angular2/src/core/di';
import {Compiler} from './compiler'; import {Compiler} from './compiler';
import {Type, BaseException, stringify, isPresent} from 'angular2/src/core/facade/lang'; import {Type, stringify, isPresent} from 'angular2/src/core/facade/lang';
import {Promise} from 'angular2/src/core/facade/async'; import {Promise} from 'angular2/src/core/facade/async';
import {AppViewManager} from 'angular2/src/core/compiler/view_manager'; import {AppViewManager} from 'angular2/src/core/compiler/view_manager';
import {ElementRef} from './element_ref'; import {ElementRef} from './element_ref';

View File

@ -1,4 +1,5 @@
import {isBlank, isPresent, BaseException} from 'angular2/src/core/facade/lang'; import {isBlank, isPresent} from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import * as eiModule from './element_injector'; import * as eiModule from './element_injector';
import {DirectiveBinding} from './element_injector'; import {DirectiveBinding} from './element_injector';
import * as viewModule from './view'; import * as viewModule from './view';

View File

@ -2,11 +2,11 @@ import {
isPresent, isPresent,
isBlank, isBlank,
Type, Type,
BaseException,
stringify, stringify,
CONST_EXPR, CONST_EXPR,
StringWrapper StringWrapper
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async'; import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import { import {

View File

@ -1,4 +1,4 @@
import {BaseException, isPresent} from 'angular2/src/core/facade/lang'; import {BaseException} from 'angular2/src/core/facade/exceptions';
import {ViewRef} from './view_ref'; import {ViewRef} from './view_ref';
import {RenderViewRef, RenderElementRef, Renderer} from 'angular2/src/core/render/api'; import {RenderViewRef, RenderElementRef, Renderer} from 'angular2/src/core/render/api';

View File

@ -1,5 +1,6 @@
import {resolveForwardRef, Injectable} from 'angular2/src/core/di'; import {resolveForwardRef, Injectable} from 'angular2/src/core/di';
import {Type, isPresent, BaseException, stringify} from 'angular2/src/core/facade/lang'; import {Type, isPresent, stringify} from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {PipeMetadata} from 'angular2/src/core/metadata'; import {PipeMetadata} from 'angular2/src/core/metadata';
import {reflector} from 'angular2/src/core/reflection/reflection'; import {reflector} from 'angular2/src/core/reflection/reflection';

View File

@ -1,13 +1,8 @@
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
import { import {StringWrapper, isPresent, isBlank, assertionsEnabled} from 'angular2/src/core/facade/lang';
StringWrapper, import {BaseException} from 'angular2/src/core/facade/exceptions';
isPresent,
isBlank,
BaseException,
assertionsEnabled
} from 'angular2/src/core/facade/lang';
import {reflector} from 'angular2/src/core/reflection/reflection'; import {reflector} from 'angular2/src/core/reflection/reflection';
import { import {

View File

@ -25,7 +25,8 @@ import {
DirectiveBinding DirectiveBinding
} from './element_injector'; } from './element_injector';
import {ElementBinder} from './element_binder'; import {ElementBinder} from './element_binder';
import {isPresent, isBlank, BaseException} from 'angular2/src/core/facade/lang'; import {isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import * as renderApi from 'angular2/src/core/render/api'; import * as renderApi from 'angular2/src/core/render/api';
import {RenderEventDispatcher} from 'angular2/src/core/render/api'; import {RenderEventDispatcher} from 'angular2/src/core/render/api';
import {ViewRef, ProtoViewRef, internalView} from './view_ref'; import {ViewRef, ProtoViewRef, internalView} from './view_ref';
@ -318,7 +319,7 @@ class _Context {
/** /**
* Wraps an exception thrown by an event handler. * Wraps an exception thrown by an event handler.
*/ */
class EventEvaluationError extends BaseException { class EventEvaluationError extends WrappedException {
constructor(eventName: string, originalException: any, originalStack: any, context: any) { constructor(eventName: string, originalException: any, originalStack: any, context: any) {
super(`Error during evaluation of "${eventName}"`, originalException, originalStack, context); super(`Error during evaluation of "${eventName}"`, originalException, originalStack, context);
} }

View File

@ -1,5 +1,6 @@
import {Injector, Binding, Injectable, ResolvedBinding} from 'angular2/src/core/di'; import {Injector, Binding, Injectable, ResolvedBinding} from 'angular2/src/core/di';
import {isPresent, isBlank, BaseException} from 'angular2/src/core/facade/lang'; import {isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import * as viewModule from './view'; import * as viewModule from './view';
import {ElementRef} from './element_ref'; import {ElementRef} from './element_ref';
import {ProtoViewRef, ViewRef, HostViewRef, internalView, internalProtoView} from './view_ref'; import {ProtoViewRef, ViewRef, HostViewRef, internalView, internalProtoView} from './view_ref';

View File

@ -1,7 +1,7 @@
import {Injector, Binding, Injectable, ResolvedBinding} from 'angular2/src/core/di'; import {Injector, Binding, Injectable, ResolvedBinding} from 'angular2/src/core/di';
import {ListWrapper, MapWrapper, Map, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper, Map, StringMapWrapper} from 'angular2/src/core/facade/collection';
import * as eli from './element_injector'; import * as eli from './element_injector';
import {isPresent, isBlank, BaseException} from 'angular2/src/core/facade/lang'; import {isPresent, isBlank} from 'angular2/src/core/facade/lang';
import * as viewModule from './view'; import * as viewModule from './view';
import {internalView} from './view_ref'; import {internalView} from './view_ref';
import * as avmModule from './view_manager'; import * as avmModule from './view_manager';

View File

@ -1,7 +1,8 @@
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
import {ViewMetadata} from '../metadata/view'; import {ViewMetadata} from '../metadata/view';
import {Type, stringify, isBlank, BaseException} from 'angular2/src/core/facade/lang'; import {Type, stringify, isBlank} from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/exceptions';
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {reflector} from 'angular2/src/core/reflection/reflection'; import {reflector} from 'angular2/src/core/reflection/reflection';

View File

@ -1,4 +1,4 @@
import {Type, isPresent, BaseException, isBlank} from 'angular2/src/core/facade/lang'; import {Type, isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {ListWrapper, MapWrapper, Predicate} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper, Predicate} from 'angular2/src/core/facade/collection';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';

View File

@ -4,11 +4,11 @@ import {
isPresent, isPresent,
CONST, CONST,
CONST_EXPR, CONST_EXPR,
BaseException,
stringify, stringify,
isArray, isArray,
normalizeBool normalizeBool
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {reflector} from 'angular2/src/core/reflection/reflection'; import {reflector} from 'angular2/src/core/reflection/reflection';
import {Key} from './key'; import {Key} from './key';

View File

@ -1,5 +1,6 @@
import {ListWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper} from 'angular2/src/core/facade/collection';
import {stringify, BaseException, isBlank} from 'angular2/src/core/facade/lang'; import {stringify, isBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {Key} from './key'; import {Key} from './key';
import {Injector} from './injector'; import {Injector} from './injector';
@ -37,9 +38,8 @@ export class AbstractBindingError extends BaseException {
injectors: Injector[]; injectors: Injector[];
constructResolvingMessage: Function; constructResolvingMessage: Function;
constructor(injector: Injector, key: Key, constructResolvingMessage: Function, originalException?, constructor(injector: Injector, key: Key, constructResolvingMessage: Function) {
originalStack?) { super("DI Exception");
super("DI Exception", originalException, originalStack, null);
this.keys = [key]; this.keys = [key];
this.injectors = [injector]; this.injectors = [injector];
this.constructResolvingMessage = constructResolvingMessage; this.constructResolvingMessage = constructResolvingMessage;
@ -53,8 +53,6 @@ export class AbstractBindingError extends BaseException {
} }
get context() { return this.injectors[this.injectors.length - 1].debugContext(); } get context() { return this.injectors[this.injectors.length - 1].debugContext(); }
toString(): string { return this.message; }
} }
/** /**
@ -100,16 +98,30 @@ export class CyclicDependencyError extends AbstractBindingError {
* The `InstantiationError` class contains the original error plus the dependency graph which caused * The `InstantiationError` class contains the original error plus the dependency graph which caused
* this object to be instantiated. * this object to be instantiated.
*/ */
export class InstantiationError extends AbstractBindingError { export class InstantiationError extends WrappedException {
causeKey: Key; name: string;
constructor(injector: Injector, originalException, originalStack, key: Key) { keys: Key[];
super(injector, key, function(keys: any[]) { injectors: Injector[];
var first = stringify(ListWrapper.first(keys).token);
return `Error during instantiation of ${first}!${constructResolvingPath(keys)}.`;
}, originalException, originalStack);
this.causeKey = key; constructor(injector: Injector, originalException, originalStack, key: Key) {
super("DI Exception", originalException, originalStack, null);
this.keys = [key];
this.injectors = [injector];
} }
addKey(injector: Injector, key: Key): void {
this.injectors.push(injector);
this.keys.push(key);
}
get wrapperMessage(): string {
var first = stringify(ListWrapper.first(this.keys).token);
return `Error during instantiation of ${first}!${constructResolvingPath(this.keys)}.`;
}
get causeKey(): Key { return this.keys[0]; }
get context() { return this.injectors[this.injectors.length - 1].debugContext(); }
} }
/** /**

View File

@ -647,7 +647,7 @@ export class Injector {
d18 = length > 18 ? this._getByDependency(binding, deps[18], visibility) : null; d18 = length > 18 ? this._getByDependency(binding, deps[18], visibility) : null;
d19 = length > 19 ? this._getByDependency(binding, deps[19], visibility) : null; d19 = length > 19 ? this._getByDependency(binding, deps[19], visibility) : null;
} catch (e) { } catch (e) {
if (e instanceof AbstractBindingError) { if (e instanceof AbstractBindingError || e instanceof InstantiationError) {
e.addKey(this, binding.key); e.addKey(this, binding.key);
} }
throw e; throw e;

View File

@ -1,5 +1,6 @@
import {MapWrapper} from 'angular2/src/core/facade/collection'; import {MapWrapper} from 'angular2/src/core/facade/collection';
import {stringify, CONST, Type, isBlank, BaseException} from 'angular2/src/core/facade/lang'; import {stringify, CONST, Type, isBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {TypeLiteral} from './type_literal'; import {TypeLiteral} from './type_literal';
import {resolveForwardRef} from './forward_ref'; import {resolveForwardRef} from './forward_ref';

View File

@ -1,4 +1,5 @@
import {BaseException, isBlank} from 'angular2/src/core/facade/lang'; import {isBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
export var DOM: DomAdapter; export var DOM: DomAdapter;

View File

@ -9,13 +9,8 @@ var url = require('url');
import {MapWrapper, ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {MapWrapper, ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {DomAdapter, setRootDomAdapter} from './dom_adapter'; import {DomAdapter, setRootDomAdapter} from './dom_adapter';
import { import {isPresent, isBlank, global, setValueOnPath} from 'angular2/src/core/facade/lang';
BaseException, import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
isPresent,
isBlank,
global,
setValueOnPath
} from 'angular2/src/core/facade/lang';
import {SelectorMatcher, CssSelector} from 'angular2/src/core/render/dom/compiler/selector'; import {SelectorMatcher, CssSelector} from 'angular2/src/core/render/dom/compiler/selector';
var _attrToPropMap = { var _attrToPropMap = {

View File

@ -2,3 +2,4 @@
export {Type} from './facade/lang'; export {Type} from './facade/lang';
export {Observable, EventEmitter} from './facade/async'; export {Observable, EventEmitter} from './facade/async';
export {Predicate} from './facade/collection'; export {Predicate} from './facade/collection';
export {WrappedException} from './facade/exceptions';

View File

@ -1,4 +1,5 @@
import {isPresent, isBlank, print, BaseException} from 'angular2/src/core/facade/lang'; import {isPresent, isBlank, print} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {ListWrapper, isListLikeIterable} from 'angular2/src/core/facade/collection'; import {ListWrapper, isListLikeIterable} from 'angular2/src/core/facade/collection';
class _ArrayLogger { class _ArrayLogger {
@ -45,7 +46,7 @@ export class ExceptionHandler {
var originalStack = this._findOriginalStack(exception); var originalStack = this._findOriginalStack(exception);
var context = this._findContext(exception); var context = this._findContext(exception);
this._logger.logGroup(`EXCEPTION: ${exception}`); this._logger.logGroup(`EXCEPTION: ${this._extractMessage(exception)}`);
if (isPresent(stackTrace) && isBlank(originalStack)) { if (isPresent(stackTrace) && isBlank(originalStack)) {
this._logger.logError("STACKTRACE:"); this._logger.logError("STACKTRACE:");
@ -57,7 +58,7 @@ export class ExceptionHandler {
} }
if (isPresent(originalException)) { if (isPresent(originalException)) {
this._logger.logError(`ORIGINAL EXCEPTION: ${originalException}`); this._logger.logError(`ORIGINAL EXCEPTION: ${this._extractMessage(originalException)}`);
} }
if (isPresent(originalStack)) { if (isPresent(originalStack)) {
@ -77,6 +78,10 @@ export class ExceptionHandler {
if (this._rethrowException) throw exception; if (this._rethrowException) throw exception;
} }
_extractMessage(exception: any): string {
return exception instanceof WrappedException ? exception.wrapperMessage : exception.toString();
}
_longStackTrace(stackTrace: any): any { _longStackTrace(stackTrace: any): any {
return isListLikeIterable(stackTrace) ? (<any>stackTrace).join("\n\n-----async gap-----\n") : return isListLikeIterable(stackTrace) ? (<any>stackTrace).join("\n\n-----async gap-----\n") :
stackTrace.toString(); stackTrace.toString();
@ -84,7 +89,7 @@ export class ExceptionHandler {
_findContext(exception: any): any { _findContext(exception: any): any {
try { try {
if (!(exception instanceof BaseException)) return null; if (!(exception instanceof WrappedException)) return null;
return isPresent(exception.context) ? exception.context : return isPresent(exception.context) ? exception.context :
this._findContext(exception.originalException); this._findContext(exception.originalException);
} catch (e) { } catch (e) {
@ -94,10 +99,10 @@ export class ExceptionHandler {
} }
_findOriginalException(exception: any): any { _findOriginalException(exception: any): any {
if (!(exception instanceof BaseException)) return null; if (!(exception instanceof WrappedException)) return null;
var e = exception.originalException; var e = exception.originalException;
while (e instanceof BaseException && isPresent(e.originalException)) { while (e instanceof WrappedException && isPresent(e.originalException)) {
e = e.originalException; e = e.originalException;
} }
@ -105,13 +110,13 @@ export class ExceptionHandler {
} }
_findOriginalStack(exception: any): any { _findOriginalStack(exception: any): any {
if (!(exception instanceof BaseException)) return null; if (!(exception instanceof WrappedException)) return null;
var e = exception; var e = exception;
var stack = exception.originalStack; var stack = exception.originalStack;
while (e instanceof BaseException && isPresent(e.originalException)) { while (e instanceof WrappedException && isPresent(e.originalException)) {
e = e.originalException; e = e.originalException;
if (e instanceof BaseException && isPresent(e.originalException)) { if (e instanceof WrappedException && isPresent(e.originalException)) {
stack = e.originalStack; stack = e.originalStack;
} }
} }

View File

@ -0,0 +1,32 @@
library angular.core.facade.exceptions;
import 'exception_handler.dart';
export 'exception_handler.dart';
class BaseException extends Error {
final String message;
BaseException([this.message]);
String toString() {
return this.message;
}
}
class WrappedException extends Error {
final dynamic context;
final String wrapperMessage;
final originalException;
final originalStack;
WrappedException(
[this.wrapperMessage, this.originalException, this.originalStack, this.context]);
get message { return ExceptionHandler.exceptionToString(this); }
String toString() { return this.message; }
}
Error makeTypeError([String message = ""]) {
return new BaseException(message);
}

View File

@ -0,0 +1,45 @@
/// <reference path="../../../manual_typings/globals.d.ts" />
import {ExceptionHandler} from './exception_handler';
export {ExceptionHandler} from './exception_handler';
export class BaseException extends Error {
public stack: any;
constructor(public message?: string) {
super(message);
this.stack = (<any>new Error(message)).stack;
}
toString(): string { return this.message; }
}
export class WrappedException extends Error {
private _wrapperStack: any;
constructor(private _wrapperMessage: string, private _originalException, private _originalStack?,
private _context?) {
super(_wrapperMessage);
this._wrapperStack = (<any>new Error(_wrapperMessage)).stack;
}
get wrapperMessage(): string { return this._wrapperMessage; }
get wrapperStack(): any { return this._wrapperStack; }
get originalException(): any { return this._originalException; }
get originalStack(): any { return this._originalStack; }
get context(): any { return this._context; }
get message(): string { return ExceptionHandler.exceptionToString(this); }
toString(): string { return this.message; }
}
export function makeTypeError(message?: string): Error {
return new TypeError(message);
}

View File

@ -193,24 +193,6 @@ class FunctionWrapper {
} }
} }
class BaseException extends Error {
final dynamic context;
final String message;
final originalException;
final originalStack;
BaseException(
[this.message, this.originalException, this.originalStack, this.context]);
String toString() {
return this.message;
}
}
Error makeTypeError([String message = ""]) {
return new BaseException(message);
}
const _NAN_KEY = const Object(); const _NAN_KEY = const Object();
// Dart can have identical(str1, str2) == false while str1 == str2. Moreover, // Dart can have identical(str1, str2) == false while str1 == str2. Moreover,

View File

@ -33,26 +33,6 @@ export function getTypeNameForDebugging(type: Type): string {
return type['name']; return type['name'];
} }
export class BaseException extends Error {
stack;
constructor(public message?: string, private _originalException?, private _originalStack?,
private _context?) {
super(message);
this.stack = (<any>new Error(message)).stack;
}
get originalException(): any { return this._originalException; }
get originalStack(): any { return this._originalStack; }
get context(): any { return this._context; }
toString(): string { return this.message; }
}
export function makeTypeError(message?: string): Error {
return new TypeError(message);
}
export var Math = _global.Math; export var Math = _global.Math;
export var Date = _global.Date; export var Date = _global.Date;
@ -211,10 +191,10 @@ export class StringJoiner {
toString(): string { return this.parts.join(""); } toString(): string { return this.parts.join(""); }
} }
export class NumberParseError extends BaseException { export class NumberParseError extends Error {
name: string; name: string;
constructor(public message: string) { super(); } constructor(public message: string) { super(message); }
toString(): string { return this.message; } toString(): string { return this.message; }
} }
@ -328,11 +308,7 @@ export function isJsObject(o: any): boolean {
} }
export function print(obj: Error | Object) { export function print(obj: Error | Object) {
if (obj instanceof BaseException) {
console.log(obj.stack);
} else {
console.log(obj); console.log(obj);
}
} }
// Can't be all uppercase as our transpiler would think it is a special directive... // Can't be all uppercase as our transpiler would think it is a special directive...

View File

@ -1,5 +1,6 @@
import {ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {isBlank, BaseException, looseIdentical} from 'angular2/src/core/facade/lang'; import {isBlank, looseIdentical} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {ControlContainer} from './control_container'; import {ControlContainer} from './control_container';
import {NgControl} from './ng_control'; import {NgControl} from './ng_control';

View File

@ -1,7 +1,8 @@
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
import {ChangeDetector} from 'angular2/src/core/change_detection/change_detection'; import {ChangeDetector} from 'angular2/src/core/change_detection/change_detection';
import {NgZone} from 'angular2/src/core/zone/ng_zone'; import {NgZone} from 'angular2/src/core/zone/ng_zone';
import {isPresent, BaseException} from 'angular2/src/core/facade/lang'; import {isPresent} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {wtfLeave, wtfCreateScope, WtfScopeFn} from '../profile/profile'; import {wtfLeave, wtfCreateScope, WtfScopeFn} from '../profile/profile';
/** /**

View File

@ -1,4 +1,4 @@
import {isBlank, isPresent, isPromise, CONST, BaseException} from 'angular2/src/core/facade/lang'; import {isBlank, isPresent, isPromise, CONST} from 'angular2/src/core/facade/lang';
import {Promise, ObservableWrapper, Observable} from 'angular2/src/core/facade/async'; import {Promise, ObservableWrapper, Observable} from 'angular2/src/core/facade/async';
import {Pipe} from 'angular2/src/core/metadata'; import {Pipe} from 'angular2/src/core/metadata';
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';

View File

@ -1,4 +1,5 @@
import {ABSTRACT, BaseException, CONST, Type} from 'angular2/src/core/facade/lang'; import {ABSTRACT, CONST, Type} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
export class InvalidPipeArgumentException extends BaseException { export class InvalidPipeArgumentException extends BaseException {
constructor(type: Type, value: Object) { constructor(type: Type, value: Object) {

View File

@ -1,11 +1,5 @@
import { import {isBlank, isString, isArray, StringWrapper, CONST} from 'angular2/src/core/facade/lang';
isBlank, import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
isString,
isArray,
StringWrapper,
BaseException,
CONST
} from 'angular2/src/core/facade/lang';
import {ListWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper} from 'angular2/src/core/facade/collection';
import {Math} from 'angular2/src/core/facade/math'; import {Math} from 'angular2/src/core/facade/math';
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection'; import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';

View File

@ -5,10 +5,10 @@ import {
StringWrapper, StringWrapper,
NumberWrapper, NumberWrapper,
RegExpWrapper, RegExpWrapper,
BaseException,
CONST, CONST,
FunctionWrapper FunctionWrapper
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {NumberFormatter, NumberFormatStyle} from 'angular2/src/core/facade/intl'; import {NumberFormatter, NumberFormatStyle} from 'angular2/src/core/facade/intl';
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection'; import {PipeTransform, WrappedValue} from 'angular2/src/core/change_detection';

View File

@ -1,4 +1,5 @@
import {isBlank, isPresent, BaseException, CONST, Type} from 'angular2/src/core/facade/lang'; import {isBlank, isPresent, CONST, Type} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {StringMapWrapper} from 'angular2/src/core/facade/collection'; import {StringMapWrapper} from 'angular2/src/core/facade/collection';
import { import {
Injectable, Injectable,

View File

@ -2,7 +2,7 @@ library angular2.src.core.platform_bindings;
import 'package:angular2/core.dart'; import 'package:angular2/core.dart';
import './exception_handler.dart'; import 'package:angular2/src/core/facade/exceptions.dart';
import 'package:angular2/src/core/dom/dom_adapter.dart'; import 'package:angular2/src/core/dom/dom_adapter.dart';
exceptionFactory() => new ExceptionHandler(DOM, true); exceptionFactory() => new ExceptionHandler(DOM, true);

View File

@ -1,5 +1,5 @@
import {bind} from 'angular2/src/core/di'; import {bind} from 'angular2/src/core/di';
import {ExceptionHandler} from 'angular2/src/core/facade/exception_handler'; import {ExceptionHandler} from 'angular2/src/core/facade/exceptions';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
export const EXCEPTION_BINDING = export const EXCEPTION_BINDING =

View File

@ -1,11 +1,5 @@
import { import {Type, isPresent, isFunction, global, stringify} from 'angular2/src/core/facade/lang';
Type, import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
isPresent,
isFunction,
global,
stringify,
BaseException
} from 'angular2/src/core/facade/lang';
import {ListWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper} from 'angular2/src/core/facade/collection';
import {GetterFn, SetterFn, MethodFn} from './types'; import {GetterFn, SetterFn, MethodFn} from './types';
import {PlatformReflectionCapabilities} from 'platform_reflection_capabilities'; import {PlatformReflectionCapabilities} from 'platform_reflection_capabilities';

View File

@ -1,4 +1,5 @@
import {Type, isPresent, stringify, BaseException} from 'angular2/src/core/facade/lang'; import {Type, isPresent, stringify} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import { import {
ListWrapper, ListWrapper,
Map, Map,

View File

@ -1,7 +1,7 @@
import {Injectable, Inject} from 'angular2/src/core/di'; import {Injectable, Inject} from 'angular2/src/core/di';
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async'; import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
import {BaseException, isPresent, isBlank} from 'angular2/src/core/facade/lang'; import {isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
import { import {
@ -15,6 +15,7 @@ import {
ViewEncapsulation ViewEncapsulation
} from '../../api'; } from '../../api';
import {CompilePipeline} from './compile_pipeline'; import {CompilePipeline} from './compile_pipeline';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {ViewLoader, TemplateAndStyles} from 'angular2/src/core/render/dom/compiler/view_loader'; import {ViewLoader, TemplateAndStyles} from 'angular2/src/core/render/dom/compiler/view_loader';
import {CompileStepFactory, DefaultStepFactory} from './compile_step_factory'; import {CompileStepFactory, DefaultStepFactory} from './compile_step_factory';
import {ElementSchemaRegistry} from '../schema/element_schema_registry'; import {ElementSchemaRegistry} from '../schema/element_schema_registry';

View File

@ -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, WrappedException} from 'angular2/src/core/facade/exceptions';
import {MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {Parser} from 'angular2/src/core/change_detection/change_detection'; import {Parser} from 'angular2/src/core/change_detection/change_detection';

View File

@ -4,9 +4,9 @@ import {
isBlank, isBlank,
RegExpWrapper, RegExpWrapper,
RegExpMatcherWrapper, RegExpMatcherWrapper,
StringWrapper, StringWrapper
BaseException
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
const _EMPTY_ATTR_VALUE = ''; const _EMPTY_ATTR_VALUE = '';

View File

@ -6,8 +6,7 @@ import {
RegExpWrapper, RegExpWrapper,
RegExpMatcherWrapper, RegExpMatcherWrapper,
isPresent, isPresent,
isBlank, isBlank
BaseException
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
/** /**

View File

@ -2,11 +2,11 @@ import {Injectable} from 'angular2/src/core/di';
import { import {
isBlank, isBlank,
isPresent, isPresent,
BaseException,
stringify, stringify,
isPromise, isPromise,
StringWrapper StringWrapper
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async'; import {PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';

View File

@ -1,4 +1,5 @@
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 {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {Parser} from 'angular2/src/core/change_detection/change_detection'; import {Parser} from 'angular2/src/core/change_detection/change_detection';

View File

@ -1,11 +1,6 @@
import {Inject, Injectable, OpaqueToken} from 'angular2/src/core/di'; import {Inject, Injectable, OpaqueToken} from 'angular2/src/core/di';
import { import {isPresent, isBlank, RegExpWrapper, CONST_EXPR} from 'angular2/src/core/facade/lang';
isPresent, import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
isBlank,
BaseException,
RegExpWrapper,
CONST_EXPR
} from 'angular2/src/core/facade/lang';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';

View File

@ -1,10 +1,5 @@
import { import {CONST_EXPR} from 'angular2/src/core/facade/lang';
isBlank, import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
BaseException,
isPresent,
StringWrapper,
CONST_EXPR
} from 'angular2/src/core/facade/lang';
import {ListWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper} from 'angular2/src/core/facade/collection';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {NgZone} from 'angular2/src/core/zone/ng_zone'; import {NgZone} from 'angular2/src/core/zone/ng_zone';

View File

@ -2,7 +2,7 @@ library angular.events;
import 'dart:html'; import 'dart:html';
import './hammer_common.dart'; import './hammer_common.dart';
import 'package:angular2/src/core/facade/lang.dart' show BaseException; import 'package:angular2/src/core/facade/exceptions.dart' show BaseException;
import "package:angular2/src/core/di.dart" show Injectable; import "package:angular2/src/core/di.dart" show Injectable;
import 'dart:js' as js; import 'dart:js' as js;

View File

@ -1,7 +1,8 @@
/// <reference path="../../../../../typings/hammerjs/hammerjs.d.ts"/> /// <reference path="../../../../../typings/hammerjs/hammerjs.d.ts"/>
import {HammerGesturesPluginCommon} from './hammer_common'; import {HammerGesturesPluginCommon} from './hammer_common';
import {isPresent, BaseException} from 'angular2/src/core/facade/lang'; import {isPresent} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
@Injectable() @Injectable()

View File

@ -4,7 +4,6 @@ import {
isBlank, isBlank,
StringWrapper, StringWrapper,
RegExpWrapper, RegExpWrapper,
BaseException,
NumberWrapper NumberWrapper
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {StringMapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {StringMapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';

View File

@ -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, WrappedException} from 'angular2/src/core/facade/exceptions';
import { import {
ListWrapper, ListWrapper,
MapWrapper, MapWrapper,

View File

@ -1,5 +1,5 @@
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {isPresent, isBlank, BaseException, isArray} from 'angular2/src/core/facade/lang'; import {isPresent, isBlank, isArray} from 'angular2/src/core/facade/lang';
import {ListWrapper, SetWrapper, MapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, SetWrapper, MapWrapper} from 'angular2/src/core/facade/collection';
import {DomProtoView, DomProtoViewRef, resolveInternalDomProtoView} from './proto_view'; import {DomProtoView, DomProtoViewRef, resolveInternalDomProtoView} from './proto_view';

View File

@ -1,6 +1,6 @@
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {ListWrapper, MapWrapper, Map, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper, Map, StringMapWrapper} from 'angular2/src/core/facade/collection';
import {isPresent, isBlank, BaseException, stringify} from 'angular2/src/core/facade/lang'; import {isPresent, isBlank, stringify} from 'angular2/src/core/facade/lang';
import {DomProtoView} from './proto_view'; import {DomProtoView} from './proto_view';

View File

@ -1,6 +1,7 @@
import {XHR} from 'angular2/src/core/render/xhr'; import {XHR} from 'angular2/src/core/render/xhr';
import {ListWrapper, Map, MapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, Map, MapWrapper} from 'angular2/src/core/facade/collection';
import {isBlank, isPresent, normalizeBlank, BaseException} from 'angular2/src/core/facade/lang'; import {isBlank, isPresent, normalizeBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {PromiseCompleter, PromiseWrapper, Promise} from 'angular2/src/core/facade/async'; import {PromiseCompleter, PromiseWrapper, Promise} from 'angular2/src/core/facade/async';
export class MockXHR extends XHR { export class MockXHR extends XHR {

View File

@ -1,11 +1,6 @@
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
import { import {isPresent, isBlank, RegExpWrapper, normalizeBlank} from 'angular2/src/core/facade/lang';
isPresent, import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
isBlank,
RegExpWrapper,
BaseException,
normalizeBlank
} from 'angular2/src/core/facade/lang';
import {ListWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper} from 'angular2/src/core/facade/collection';
/** /**

View File

@ -1,7 +1,7 @@
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
import {DOM} from 'angular2/src/core/dom/dom_adapter'; import {DOM} from 'angular2/src/core/dom/dom_adapter';
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {StringWrapper, isBlank, BaseException} from 'angular2/src/core/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import * as getTestabilityModule from './get_testability'; import * as getTestabilityModule from './get_testability';
import {NgZone} from '../zone/ng_zone'; import {NgZone} from '../zone/ng_zone';
import {PromiseWrapper} from 'angular2/src/core/facade/async'; import {PromiseWrapper} from 'angular2/src/core/facade/async';

View File

@ -6,7 +6,8 @@ import {ResponseOptions, BaseResponseOptions} from '../base_response_options';
import {Injectable} from 'angular2/src/core/di'; import {Injectable} from 'angular2/src/core/di';
import {BrowserJsonp} from './browser_jsonp'; import {BrowserJsonp} from './browser_jsonp';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async'; import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {StringWrapper, isPresent, makeTypeError} from 'angular2/src/core/facade/lang'; import {makeTypeError} from 'angular2/src/core/facade/exceptions';
import {StringWrapper, isPresent} from 'angular2/src/core/facade/lang';
export class JSONPConnection implements Connection { export class JSONPConnection implements Connection {
readyState: ReadyStates; readyState: ReadyStates;

View File

@ -5,7 +5,7 @@ import {ReadyStates} from '../enums';
import {Connection, ConnectionBackend} from '../interfaces'; import {Connection, ConnectionBackend} from '../interfaces';
import {ObservableWrapper, EventEmitter} from 'angular2/src/core/facade/async'; import {ObservableWrapper, EventEmitter} from 'angular2/src/core/facade/async';
import {isPresent} from 'angular2/src/core/facade/lang'; import {isPresent} from 'angular2/src/core/facade/lang';
import {BaseException} from 'angular2/src/core/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
/** /**
* *

View File

@ -1,11 +1,5 @@
import { import {isPresent, isBlank, isJsObject, isType, StringWrapper} from 'angular2/src/core/facade/lang';
isPresent, import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
isBlank,
isJsObject,
isType,
StringWrapper,
BaseException
} from 'angular2/src/core/facade/lang';
import { import {
isListLikeIterable, isListLikeIterable,
Map, Map,

View File

@ -1,4 +1,5 @@
import {isString, isPresent, isBlank, makeTypeError} from 'angular2/src/core/facade/lang'; import {isString, isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {makeTypeError} from 'angular2/src/core/facade/exceptions';
import {Injectable} from 'angular2/src/core/di/decorators'; import {Injectable} from 'angular2/src/core/di/decorators';
import {RequestOptionsArgs, Connection, ConnectionBackend} from './interfaces'; import {RequestOptionsArgs, Connection, ConnectionBackend} from './interfaces';
import {Request} from './static_request'; import {Request} from './static_request';

View File

@ -9,7 +9,7 @@ import {
ResponseTypes ResponseTypes
} from './enums'; } from './enums';
import {Headers} from './headers'; import {Headers} from './headers';
import {BaseException} from 'angular2/src/core/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {EventEmitter} from 'angular2/src/core/facade/async'; import {EventEmitter} from 'angular2/src/core/facade/async';
import {Request} from './static_request'; import {Request} from './static_request';
import {URLSearchParamsUnionFixer, URLSearchParams} from './url_search_params'; import {URLSearchParamsUnionFixer, URLSearchParams} from './url_search_params';

View File

@ -2,7 +2,6 @@ import {RequestMethods, RequestModesOpts, RequestCredentialsOpts, RequestCacheOp
import {RequestOptions} from './base_request_options'; import {RequestOptions} from './base_request_options';
import {Headers} from './headers'; import {Headers} from './headers';
import { import {
BaseException,
RegExpWrapper, RegExpWrapper,
CONST_EXPR, CONST_EXPR,
isPresent, isPresent,
@ -10,6 +9,7 @@ import {
StringWrapper StringWrapper
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
// TODO(jeffbcross): properly implement body accessors // TODO(jeffbcross): properly implement body accessors
/** /**
* Creates `Request` instances from provided values. * Creates `Request` instances from provided values.

View File

@ -1,5 +1,6 @@
import {ResponseTypes} from './enums'; import {ResponseTypes} from './enums';
import {BaseException, CONST_EXPR, isString, isPresent, Json} from 'angular2/src/core/facade/lang'; import {CONST_EXPR, isString, isPresent, Json} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {Headers} from './headers'; import {Headers} from './headers';
import {ResponseOptions} from './base_response_options'; import {ResponseOptions} from './base_response_options';
import {isJsObject} from './http_utils'; import {isJsObject} from './http_utils';

View File

@ -1,12 +1,5 @@
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import { import {Type, isPresent, stringify, isBlank, print} from 'angular2/src/core/facade/lang';
Type,
isPresent,
BaseException,
stringify,
isBlank,
print
} from 'angular2/src/core/facade/lang';
import {DirectiveMetadata, ComponentMetadata} from '../core/metadata'; import {DirectiveMetadata, ComponentMetadata} from '../core/metadata';
import {DirectiveResolver} from 'angular2/src/core/compiler/directive_resolver'; import {DirectiveResolver} from 'angular2/src/core/compiler/directive_resolver';

View File

@ -1,5 +1,6 @@
import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection'; import {Map, MapWrapper, ListWrapper} from 'angular2/src/core/facade/collection';
import {Type, isPresent, BaseException, stringify, isBlank} from 'angular2/src/core/facade/lang'; import {Type, isPresent, stringify, isBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {ViewMetadata} from '../core/metadata'; import {ViewMetadata} from '../core/metadata';
import {ViewResolver} from 'angular2/src/core/compiler/view_resolver'; import {ViewResolver} from 'angular2/src/core/compiler/view_resolver';

View File

@ -1,7 +1,8 @@
import {LocationStrategy} from './location_strategy'; import {LocationStrategy} from './location_strategy';
import {StringWrapper, isPresent, CONST_EXPR} from 'angular2/src/core/facade/lang'; import {StringWrapper, isPresent, CONST_EXPR} from 'angular2/src/core/facade/lang';
import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async'; import {EventEmitter, ObservableWrapper} from 'angular2/src/core/facade/async';
import {BaseException, isBlank} from 'angular2/src/core/facade/lang'; import {isBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {OpaqueToken, Injectable, Optional, Inject} from 'angular2/src/core/di'; import {OpaqueToken, Injectable, Optional, Inject} from 'angular2/src/core/di';
export const APP_BASE_HREF: OpaqueToken = CONST_EXPR(new OpaqueToken('appBaseHref')); export const APP_BASE_HREF: OpaqueToken = CONST_EXPR(new OpaqueToken('appBaseHref'));

View File

@ -1,4 +1,4 @@
import {BaseException} from 'angular2/src/core/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
function _abstract() { function _abstract() {
return new BaseException('This method is abstract'); return new BaseException('This method is abstract');

View File

@ -4,9 +4,10 @@ import {
RegExpMatcherWrapper, RegExpMatcherWrapper,
StringWrapper, StringWrapper,
isPresent, isPresent,
isBlank, isBlank
BaseException
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import { import {
Map, Map,
MapWrapper, MapWrapper,

View File

@ -1,6 +1,8 @@
import {AsyncRoute, AuxRoute, Route, Redirect, RouteDefinition} from './route_config_decorator'; import {AsyncRoute, AuxRoute, Route, Redirect, RouteDefinition} from './route_config_decorator';
import {ComponentDefinition} from './route_definition'; import {ComponentDefinition} from './route_definition';
import {Type, BaseException} from 'angular2/src/core/facade/lang'; import {Type} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
/** /**
* Given a JS Object that represents... returns a corresponding Route, AsyncRoute, or Redirect * Given a JS Object that represents... returns a corresponding Route, AsyncRoute, or Redirect

View File

@ -6,9 +6,9 @@ import {
isPresent, isPresent,
isType, isType,
isStringMap, isStringMap,
BaseException,
Type Type
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import { import {
Map, Map,
MapWrapper, MapWrapper,

View File

@ -17,10 +17,10 @@ import {
isStringMap, isStringMap,
isFunction, isFunction,
StringWrapper, StringWrapper,
BaseException,
Type, Type,
getTypeNameForDebugging getTypeNameForDebugging
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import { import {
RouteConfig, RouteConfig,
AsyncRoute, AsyncRoute,

View File

@ -11,10 +11,9 @@ import {
StringWrapper, StringWrapper,
isPresent, isPresent,
Type, Type,
isArray, isArray
BaseException
} from 'angular2/src/core/facade/lang'; } from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {RouteRegistry} from './route_registry'; import {RouteRegistry} from './route_registry';
import {Pipeline} from './pipeline'; import {Pipeline} from './pipeline';
import {ComponentInstruction, Instruction, stringifyInstruction} from './instruction'; import {ComponentInstruction, Instruction, stringifyInstruction} from './instruction';

View File

@ -1,6 +1,7 @@
import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async'; import {Promise, PromiseWrapper} from 'angular2/src/core/facade/async';
import {StringMapWrapper} from 'angular2/src/core/facade/collection'; import {StringMapWrapper} from 'angular2/src/core/facade/collection';
import {isBlank, isPresent, BaseException} from 'angular2/src/core/facade/lang'; import {isBlank, isPresent} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {Directive, Attribute} from 'angular2/src/core/metadata'; import {Directive, Attribute} from 'angular2/src/core/metadata';
import {DynamicComponentLoader, ComponentRef, ElementRef} from 'angular2/src/core/compiler'; import {DynamicComponentLoader, ComponentRef, ElementRef} from 'angular2/src/core/compiler';

View File

@ -1,11 +1,6 @@
import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection'; import {StringMap, StringMapWrapper} from 'angular2/src/core/facade/collection';
import { import {isPresent, isBlank, RegExpWrapper, CONST_EXPR} from 'angular2/src/core/facade/lang';
isPresent, import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
isBlank,
BaseException,
RegExpWrapper,
CONST_EXPR
} from 'angular2/src/core/facade/lang';
/** /**
* This class represents a parsed URL * This class represents a parsed URL

View File

@ -1,6 +1,7 @@
import {BrowserDomAdapter} from 'angular2/src/core/dom/browser_adapter'; import {BrowserDomAdapter} from 'angular2/src/core/dom/browser_adapter';
import {document, window} from 'angular2/src/core/facade/browser'; import {document, window} from 'angular2/src/core/facade/browser';
import {NumberWrapper, BaseException, isBlank} from 'angular2/src/core/facade/lang'; import {NumberWrapper, isBlank} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
var DOM = new BrowserDomAdapter(); var DOM = new BrowserDomAdapter();

View File

@ -2,7 +2,7 @@ library test_lib.fake_async;
import 'dart:async' show runZoned, ZoneSpecification; import 'dart:async' show runZoned, ZoneSpecification;
import 'package:quiver/testing/async.dart' as quiver; import 'package:quiver/testing/async.dart' as quiver;
import 'package:angular2/src/core/facade/lang.dart' show BaseException; import 'package:angular2/src/core/facade/exceptions.dart' show BaseException;
const _u = const Object(); const _u = const Object();

View File

@ -1,6 +1,7 @@
/// <reference path="../../typings/jasmine/jasmine.d.ts"/> /// <reference path="../../typings/jasmine/jasmine.d.ts"/>
import {BaseException, global} from 'angular2/src/core/facade/lang'; import {global} from 'angular2/src/core/facade/lang';
import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {ListWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper} from 'angular2/src/core/facade/collection';
import {NgZoneZone} from 'angular2/src/core/zone/ng_zone'; import {NgZoneZone} from 'angular2/src/core/zone/ng_zone';

View File

@ -1,6 +1,6 @@
import {Injector, bind, Injectable} from 'angular2/src/core/di'; import {Injector, bind, Injectable} from 'angular2/src/core/di';
import {Type, isPresent, BaseException, isBlank} from 'angular2/src/core/facade/lang'; import {Type, isPresent, isBlank} from 'angular2/src/core/facade/lang';
import {Promise} from 'angular2/src/core/facade/async'; import {Promise} from 'angular2/src/core/facade/async';
import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection'; import {ListWrapper, MapWrapper} from 'angular2/src/core/facade/collection';

View File

@ -13,7 +13,7 @@ import {
KeyValueDiffers, KeyValueDiffers,
defaultKeyValueDiffers defaultKeyValueDiffers
} from 'angular2/src/core/change_detection/change_detection'; } from 'angular2/src/core/change_detection/change_detection';
import {ExceptionHandler} from 'angular2/src/core/facade/exception_handler'; import {ExceptionHandler} from 'angular2/src/core/facade/exceptions';
import {ViewLoader} from 'angular2/src/core/render/dom/compiler/view_loader'; import {ViewLoader} from 'angular2/src/core/render/dom/compiler/view_loader';
import {ViewResolver} from 'angular2/src/core/compiler/view_resolver'; import {ViewResolver} from 'angular2/src/core/compiler/view_resolver';
import {DirectiveResolver} from 'angular2/src/core/compiler/directive_resolver'; import {DirectiveResolver} from 'angular2/src/core/compiler/directive_resolver';

View File

@ -22,7 +22,6 @@ import 'package:angular2/src/core/reflection/reflection_capabilities.dart';
import 'package:angular2/src/core/di/binding.dart' show bind; import 'package:angular2/src/core/di/binding.dart' show bind;
import 'package:angular2/src/core/di/injector.dart' show Injector; import 'package:angular2/src/core/di/injector.dart' show Injector;
import 'package:angular2/src/core/facade/exception_handler.dart' show ExceptionHandler;
import 'package:angular2/src/core/facade/collection.dart' show StringMapWrapper; import 'package:angular2/src/core/facade/collection.dart' show StringMapWrapper;
import 'test_injector.dart'; import 'test_injector.dart';
@ -77,7 +76,7 @@ Expect expect(actual, [matcher]) {
const _u = const Object(); const _u = const Object();
expectErrorMessage(actual, expectedMessage) { expectErrorMessage(actual, expectedMessage) {
expect(ExceptionHandler.exceptionToString(actual)).toContain(expectedMessage); expect(actual.toString()).toContain(expectedMessage);
} }
expectException(Function actual, expectedMessage) { expectException(Function actual, expectedMessage) {

View File

@ -6,7 +6,6 @@ import {global, isFunction} from 'angular2/src/core/facade/lang';
import {NgZoneZone} from 'angular2/src/core/zone/ng_zone'; import {NgZoneZone} from 'angular2/src/core/zone/ng_zone';
import {bind} from 'angular2/src/core/di'; import {bind} from 'angular2/src/core/di';
import {ExceptionHandler} from 'angular2/src/core/facade/exception_handler';
import {createTestInjector, FunctionWithParamTokens, inject} from './test_injector'; import {createTestInjector, FunctionWithParamTokens, inject} from './test_injector';
@ -285,7 +284,7 @@ _global.beforeEach(function() {
toContainError: function() { toContainError: function() {
return { return {
compare: function(actual, expectedText) { compare: function(actual, expectedText) {
var errorMessage = ExceptionHandler.exceptionToString(actual); var errorMessage = actual.toString();
return { return {
pass: errorMessage.indexOf(expectedText) > -1, pass: errorMessage.indexOf(expectedText) > -1,
get message() { return 'Expected ' + errorMessage + ' to contain ' + expectedText; } get message() { return 'Expected ' + errorMessage + ' to contain ' + expectedText; }
@ -304,7 +303,7 @@ _global.beforeEach(function() {
get message() { return "Was expected to throw, but did not throw"; } get message() { return "Was expected to throw, but did not throw"; }
}; };
} catch (e) { } catch (e) {
var errorMessage = ExceptionHandler.exceptionToString(e); var errorMessage = e.toString();
return { return {
pass: errorMessage.indexOf(expectedText) > -1, pass: errorMessage.indexOf(expectedText) > -1,
get message() { return 'Expected ' + errorMessage + ' to contain ' + expectedText; } get message() { return 'Expected ' + errorMessage + ' to contain ' + expectedText; }

View File

@ -6,6 +6,7 @@ import 'package:angular2/src/web_workers/shared/message_bus.dart'
show MessageBus, MessageBusSink, MessageBusSource; show MessageBus, MessageBusSink, MessageBusSource;
import 'package:angular2/src/core/zone/ng_zone.dart'; import 'package:angular2/src/core/zone/ng_zone.dart';
import 'package:angular2/src/core/facade/lang.dart'; import 'package:angular2/src/core/facade/lang.dart';
import 'package:angular2/src/core/facade/exceptions.dart';
class GenericMessageBus implements MessageBus { class GenericMessageBus implements MessageBus {
final MessageBusSink _sink; final MessageBusSink _sink;

View File

@ -1,5 +1,5 @@
import {EventEmitter} from 'angular2/src/core/facade/async'; import {EventEmitter} from 'angular2/src/core/facade/async';
import {BaseException} from 'angular2/src/core/facade/lang'; import {BaseException, WrappedException} from 'angular2/src/core/facade/exceptions';
import {NgZone} from 'angular2/src/core/zone/ng_zone'; import {NgZone} from 'angular2/src/core/zone/ng_zone';
export {EventEmitter, Observable} from 'angular2/src/core/facade/async'; export {EventEmitter, Observable} from 'angular2/src/core/facade/async';

Some files were not shown because too many files have changed in this diff Show More