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
@@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {BaseException, ClassProvider, ExceptionHandler, ExistingProvider, FactoryProvider, Injectable, Injector, NgZone, OpaqueToken, PLATFORM_INITIALIZER, PlatformRef, Provider, RootRenderer, Testability, TypeProvider, ValueProvider, createPlatformFactory, isDevMode, platformCore} from '@angular/core';
|
||||
import {ClassProvider, ErrorHandler, ExistingProvider, FactoryProvider, Injectable, Injector, NgZone, OpaqueToken, PLATFORM_INITIALIZER, PlatformRef, Provider, RootRenderer, Testability, TypeProvider, ValueProvider, createPlatformFactory, isDevMode, platformCore} from '@angular/core';
|
||||
|
||||
import {wtfInit} from '../core_private';
|
||||
|
||||
@@ -74,7 +74,7 @@ export const _WORKER_UI_PLATFORM_PROVIDERS: Provider[] = [
|
||||
MessageBasedRenderer,
|
||||
{provide: WORKER_UI_STARTABLE_MESSAGING_SERVICE, useExisting: MessageBasedRenderer, multi: true},
|
||||
BROWSER_SANITIZATION_PROVIDERS,
|
||||
{provide: ExceptionHandler, useFactory: _exceptionHandler, deps: []},
|
||||
{provide: ErrorHandler, useFactory: _exceptionHandler, deps: []},
|
||||
{provide: DOCUMENT, useFactory: _document, deps: []},
|
||||
// TODO(jteplitz602): Investigate if we definitely need EVENT_MANAGER on the render thread
|
||||
// #5298
|
||||
@@ -127,7 +127,7 @@ function initWebWorkerRenderPlatform(injector: Injector): () => void {
|
||||
try {
|
||||
scriptUri = injector.get(WORKER_SCRIPT);
|
||||
} catch (e) {
|
||||
throw new BaseException(
|
||||
throw new Error(
|
||||
'You must provide your WebWorker\'s initialization script with the WORKER_SCRIPT token');
|
||||
}
|
||||
|
||||
@@ -144,8 +144,8 @@ function initWebWorkerRenderPlatform(injector: Injector): () => void {
|
||||
export const platformWorkerUi =
|
||||
createPlatformFactory(platformCore, 'workerUi', _WORKER_UI_PLATFORM_PROVIDERS);
|
||||
|
||||
function _exceptionHandler(): ExceptionHandler {
|
||||
return new ExceptionHandler(getDOM());
|
||||
function _exceptionHandler(): ErrorHandler {
|
||||
return new ErrorHandler();
|
||||
}
|
||||
|
||||
function _document(): any {
|
||||
|
||||
Reference in New Issue
Block a user