From aba9d0e6b869eee8e73f9f570394122bca57a1a9 Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Thu, 7 Aug 2025 19:58:20 +0200 Subject: move FailedAuthenticationException to except package --- src/main/kotlin/Authenticator.kt | 4 ++-- src/main/kotlin/FailedAuthenticationException.kt | 6 ------ src/main/kotlin/except/FailedAuthenticationException.kt | 8 ++++++++ 3 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 src/main/kotlin/FailedAuthenticationException.kt create mode 100644 src/main/kotlin/except/FailedAuthenticationException.kt diff --git a/src/main/kotlin/Authenticator.kt b/src/main/kotlin/Authenticator.kt index a146840..47747f3 100644 --- a/src/main/kotlin/Authenticator.kt +++ b/src/main/kotlin/Authenticator.kt @@ -11,8 +11,8 @@ interface Authenticator { * @param password The confirmation of the user's authenticity. * @param readFun A function to read incoming data from the underlying connection. * @param writeFun A function to write outgoing data into the underlying connection. - * @throws FailedAuthenticationException if the authentication could not be performed. A human-readable reason for - * the failure can be provided if necessary. + * @throws except.FailedAuthenticationException if the authentication could not be performed. A human-readable + * reason for the failure can be provided if necessary. */ fun authenticate(username: String, password: String, readFun: () -> Array, writeFun: (b: Array) -> Unit) } \ No newline at end of file diff --git a/src/main/kotlin/FailedAuthenticationException.kt b/src/main/kotlin/FailedAuthenticationException.kt deleted file mode 100644 index dcff7bd..0000000 --- a/src/main/kotlin/FailedAuthenticationException.kt +++ /dev/null @@ -1,6 +0,0 @@ -/** - * The authentication with the remote part failed. - * - * @param reason A human-readable reason for which the authentication failed. - */ -class FailedAuthenticationException(val reason: String) : Exception("Authentication with remote host failed: $reason") \ No newline at end of file diff --git a/src/main/kotlin/except/FailedAuthenticationException.kt b/src/main/kotlin/except/FailedAuthenticationException.kt new file mode 100644 index 0000000..94935c3 --- /dev/null +++ b/src/main/kotlin/except/FailedAuthenticationException.kt @@ -0,0 +1,8 @@ +package except + +/** + * The authentication with the remote part failed. + * + * @param reason A human-readable reason for which the authentication failed. + */ +class FailedAuthenticationException(val reason: String) : Exception("Authentication with remote host failed: $reason") \ No newline at end of file -- cgit v1.2.3