fix(errors): [2/2] Rename Exception to Error; remove from public API
BREAKING CHANGE: Exceptions are no longer part of the public API. We don't expect that anyone should be referring to the Exception types. ExceptionHandler.call(exception: any, stackTrace?: any, reason?: string): void; change to: ErrorHandler.handleError(error: any): void;
This commit is contained in:

committed by
Victor Berchet

parent
86ba072758
commit
7c07bfff97
@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
import {MetadataOverride} from '@angular/core/testing';
|
||||
import {BaseException} from '../src/facade/exceptions';
|
||||
import {stringify} from '../src/facade/lang';
|
||||
|
||||
type StringMap = {
|
||||
@ -31,8 +30,7 @@ export class MetadataOverrider {
|
||||
|
||||
if (override.set) {
|
||||
if (override.remove || override.add) {
|
||||
throw new BaseException(
|
||||
`Cannot set and add/remove ${stringify(metadataClass)} at the same time!`);
|
||||
throw new Error(`Cannot set and add/remove ${stringify(metadataClass)} at the same time!`);
|
||||
}
|
||||
setMetadata(props, override.set);
|
||||
}
|
||||
|
Reference in New Issue
Block a user