1 | "use strict";
|
---|
2 | /**
|
---|
3 | * @license
|
---|
4 | * Copyright Google LLC All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Use of this source code is governed by an MIT-style license that can be
|
---|
7 | * found in the LICENSE file at https://angular.io/license
|
---|
8 | */
|
---|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
10 | exports.UnsupportedPlatformException = exports.UnimplementedException = exports.MergeConflictException = exports.InvalidUpdateRecordException = exports.ContentHasMutatedException = exports.PathIsFileException = exports.PathIsDirectoryException = exports.FileAlreadyExistException = exports.FileDoesNotExistException = exports.UnknownException = exports.BaseException = void 0;
|
---|
11 | class BaseException extends Error {
|
---|
12 | constructor(message = '') {
|
---|
13 | super(message);
|
---|
14 | }
|
---|
15 | }
|
---|
16 | exports.BaseException = BaseException;
|
---|
17 | class UnknownException extends BaseException {
|
---|
18 | constructor(message) {
|
---|
19 | super(message);
|
---|
20 | }
|
---|
21 | }
|
---|
22 | exports.UnknownException = UnknownException;
|
---|
23 | // Exceptions
|
---|
24 | class FileDoesNotExistException extends BaseException {
|
---|
25 | constructor(path) {
|
---|
26 | super(`Path "${path}" does not exist.`);
|
---|
27 | }
|
---|
28 | }
|
---|
29 | exports.FileDoesNotExistException = FileDoesNotExistException;
|
---|
30 | class FileAlreadyExistException extends BaseException {
|
---|
31 | constructor(path) {
|
---|
32 | super(`Path "${path}" already exist.`);
|
---|
33 | }
|
---|
34 | }
|
---|
35 | exports.FileAlreadyExistException = FileAlreadyExistException;
|
---|
36 | class PathIsDirectoryException extends BaseException {
|
---|
37 | constructor(path) {
|
---|
38 | super(`Path "${path}" is a directory.`);
|
---|
39 | }
|
---|
40 | }
|
---|
41 | exports.PathIsDirectoryException = PathIsDirectoryException;
|
---|
42 | class PathIsFileException extends BaseException {
|
---|
43 | constructor(path) {
|
---|
44 | super(`Path "${path}" is a file.`);
|
---|
45 | }
|
---|
46 | }
|
---|
47 | exports.PathIsFileException = PathIsFileException;
|
---|
48 | class ContentHasMutatedException extends BaseException {
|
---|
49 | constructor(path) {
|
---|
50 | super(`Content at path "${path}" has changed between the start and the end of an update.`);
|
---|
51 | }
|
---|
52 | }
|
---|
53 | exports.ContentHasMutatedException = ContentHasMutatedException;
|
---|
54 | class InvalidUpdateRecordException extends BaseException {
|
---|
55 | constructor() {
|
---|
56 | super(`Invalid record instance.`);
|
---|
57 | }
|
---|
58 | }
|
---|
59 | exports.InvalidUpdateRecordException = InvalidUpdateRecordException;
|
---|
60 | class MergeConflictException extends BaseException {
|
---|
61 | constructor(path) {
|
---|
62 | super(`A merge conflicted on path "${path}".`);
|
---|
63 | }
|
---|
64 | }
|
---|
65 | exports.MergeConflictException = MergeConflictException;
|
---|
66 | class UnimplementedException extends BaseException {
|
---|
67 | constructor() {
|
---|
68 | super('This function is unimplemented.');
|
---|
69 | }
|
---|
70 | }
|
---|
71 | exports.UnimplementedException = UnimplementedException;
|
---|
72 | class UnsupportedPlatformException extends BaseException {
|
---|
73 | constructor() {
|
---|
74 | super('This platform is not supported by this code path.');
|
---|
75 | }
|
---|
76 | }
|
---|
77 | exports.UnsupportedPlatformException = UnsupportedPlatformException;
|
---|