diff options
author | Edoardo La Greca | 2025-08-08 16:37:41 +0200 |
---|---|---|
committer | Edoardo La Greca | 2025-08-08 16:37:41 +0200 |
commit | b9e709e3ede612995c422054fb56dfd8c12f85ad (patch) | |
tree | dae05fb57642b28334123dd52ee54919a9b12835 | |
parent | e00d101020ac21088e57c85bf0076d350f16e94f (diff) |
add UnaccessibleFileException
-rw-r--r-- | src/main/kotlin/except/UnaccessibleFileException.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/kotlin/except/UnaccessibleFileException.kt b/src/main/kotlin/except/UnaccessibleFileException.kt new file mode 100644 index 0000000..23dce0d --- /dev/null +++ b/src/main/kotlin/except/UnaccessibleFileException.kt @@ -0,0 +1,10 @@ +package except + +/** + * This exception is thrown when the file that the client is trying to open (or walk through, in case of a directory) + * cannot be accessed. + * + * @param path The path that the client tried to access, up to the first element that cannot be accessed (e.g. if the + * path the user wants to access is `/usr/foo/bar/zib` but `bar` does not exist, then [path] must be `/usr/foo/bar`). + */ +class UnaccessibleFileException(val path: String) : Exception("Cannot access file ${path}.")
\ No newline at end of file |