UNPKG

2.8 kBJavaScriptView Raw
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 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.UnsupportedPlatformException = exports.UnimplementedException = exports.MergeConflictException = exports.InvalidUpdateRecordException = exports.ContentHasMutatedException = exports.PathIsFileException = exports.PathIsDirectoryException = exports.FileAlreadyExistException = exports.FileDoesNotExistException = exports.UnknownException = exports.BaseException = void 0;
11class BaseException extends Error {
12 constructor(message = '') {
13 super(message);
14 }
15}
16exports.BaseException = BaseException;
17class UnknownException extends BaseException {
18 constructor(message) {
19 super(message);
20 }
21}
22exports.UnknownException = UnknownException;
23// Exceptions
24class FileDoesNotExistException extends BaseException {
25 constructor(path) {
26 super(`Path "${path}" does not exist.`);
27 }
28}
29exports.FileDoesNotExistException = FileDoesNotExistException;
30class FileAlreadyExistException extends BaseException {
31 constructor(path) {
32 super(`Path "${path}" already exist.`);
33 }
34}
35exports.FileAlreadyExistException = FileAlreadyExistException;
36class PathIsDirectoryException extends BaseException {
37 constructor(path) {
38 super(`Path "${path}" is a directory.`);
39 }
40}
41exports.PathIsDirectoryException = PathIsDirectoryException;
42class PathIsFileException extends BaseException {
43 constructor(path) {
44 super(`Path "${path}" is a file.`);
45 }
46}
47exports.PathIsFileException = PathIsFileException;
48class 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}
53exports.ContentHasMutatedException = ContentHasMutatedException;
54class InvalidUpdateRecordException extends BaseException {
55 constructor() {
56 super(`Invalid record instance.`);
57 }
58}
59exports.InvalidUpdateRecordException = InvalidUpdateRecordException;
60class MergeConflictException extends BaseException {
61 constructor(path) {
62 super(`A merge conflicted on path "${path}".`);
63 }
64}
65exports.MergeConflictException = MergeConflictException;
66class UnimplementedException extends BaseException {
67 constructor() {
68 super('This function is unimplemented.');
69 }
70}
71exports.UnimplementedException = UnimplementedException;
72class UnsupportedPlatformException extends BaseException {
73 constructor() {
74 super('This platform is not supported by this code path.');
75 }
76}
77exports.UnsupportedPlatformException = UnsupportedPlatformException;