UNPKG

1.55 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.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;