-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexception.js
More file actions
48 lines (48 loc) · 1.55 KB
/
exception.js
File metadata and controls
48 lines (48 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
"use strict";
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.PathIsFileException = exports.PathIsDirectoryException = exports.FileAlreadyExistException = exports.FileDoesNotExistException = exports.UnknownException = exports.BaseException = void 0;
class BaseException extends Error {
constructor(message = '') {
super(message);
}
}
exports.BaseException = BaseException;
class UnknownException extends BaseException {
constructor(message) {
super(message);
}
}
exports.UnknownException = UnknownException;
// Exceptions
class FileDoesNotExistException extends BaseException {
constructor(path) {
super(`Path "${path}" does not exist.`);
}
}
exports.FileDoesNotExistException = FileDoesNotExistException;
class FileAlreadyExistException extends BaseException {
constructor(path) {
super(`Path "${path}" already exist.`);
}
}
exports.FileAlreadyExistException = FileAlreadyExistException;
class PathIsDirectoryException extends BaseException {
constructor(path) {
super(`Path "${path}" is a directory.`);
}
}
exports.PathIsDirectoryException = PathIsDirectoryException;
class PathIsFileException extends BaseException {
constructor(path) {
super(`Path "${path}" is a file.`);
}
}
exports.PathIsFileException = PathIsFileException;
//# sourceMappingURL=exception.js.map