1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
10 | 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 |
|
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;
|