Skip to content

Commit

Permalink
refactor(@angular-devkit/core): remove deprecated exceptions
Browse files Browse the repository at this point in the history
With commits removes the several deprecated exceptions.

BREAKING CHANGE:

- `ContentHasMutatedException`, `InvalidUpdateRecordException`, `UnimplementedException` and `MergeConflictException` API from `@angular-devkit/core` have been removed in favor of the API from `@angular-devkit/schematics`.
- `UnsupportedPlatformException` - A custom error exception should be created instead.
  • Loading branch information
alan-agius4 authored and angular-robot[bot] committed Feb 21, 2023
1 parent 760ebf1 commit 0ad81cd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 71 deletions.
25 changes: 0 additions & 25 deletions goldens/public-api/angular_devkit/core/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ export class CircularDependencyFoundException extends BaseException {
// @public
function classify(str: string): string;

// @public @deprecated (undocumented)
export class ContentHasMutatedException extends BaseException {
constructor(path: string);
}

// @public
class CordHost extends SimpleMemoryHost {
constructor(_back: ReadonlyHost);
Expand Down Expand Up @@ -326,11 +321,6 @@ export class InvalidPathException extends BaseException {
constructor(path: string);
}

// @public @deprecated (undocumented)
export class InvalidUpdateRecordException extends BaseException {
constructor();
}

// @public
export function isAbsolute(p: Path): boolean;

Expand Down Expand Up @@ -535,11 +525,6 @@ export { logging }
// @public (undocumented)
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'fatal';

// @public @deprecated (undocumented)
export class MergeConflictException extends BaseException {
constructor(path: string);
}

// @public
function mergeSchemas(...schemas: (JsonSchema | undefined)[]): JsonSchema;

Expand Down Expand Up @@ -1320,21 +1305,11 @@ function trimNewlines(strings: TemplateStringsArray, ...values: any[]): string;
// @public
function underscore(str: string): string;

// @public @deprecated (undocumented)
export class UnimplementedException extends BaseException {
constructor();
}

// @public (undocumented)
export class UnknownException extends BaseException {
constructor(message: string);
}

// @public @deprecated (undocumented)
export class UnsupportedPlatformException extends BaseException {
constructor();
}

// @public (undocumented)
type UriHandler = (uri: string) => Observable<JsonObject> | Promise<JsonObject> | null | undefined;

Expand Down
46 changes: 0 additions & 46 deletions packages/angular_devkit/core/src/exception.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,49 +39,3 @@ export class PathIsFileException extends BaseException {
super(`Path "${path}" is a file.`);
}
}

/**
* @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
*/
export class ContentHasMutatedException extends BaseException {
constructor(path: string) {
super(`Content at path "${path}" has changed between the start and the end of an update.`);
}
}

/**
* @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
*/

export class InvalidUpdateRecordException extends BaseException {
constructor() {
super(`Invalid record instance.`);
}
}

/**
* @deprecated since version 14. Use the same symbol from `@angular-devkit/schematics`.
*/
export class MergeConflictException extends BaseException {
constructor(path: string) {
super(`A merge conflicted on path "${path}".`);
}
}

/**
* @deprecated since version 14. Create a custom exception implementation instead.
*/
export class UnimplementedException extends BaseException {
constructor() {
super('This function is unimplemented.');
}
}

/**
* @deprecated since version 14. Create a custom exception implementation instead.
*/
export class UnsupportedPlatformException extends BaseException {
constructor() {
super('This platform is not supported by this code path.');
}
}

0 comments on commit 0ad81cd

Please sign in to comment.