From eedbc01c3b7f1bfef1ccc341574278e0289879ae Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Thu, 7 Aug 2025 20:09:15 +0200 Subject: move UnknownVersionException to except package --- src/main/kotlin/Connection.kt | 1 + src/main/kotlin/ProtocolTranslator.kt | 2 +- src/main/kotlin/UnknownVersionException.kt | 7 ------- src/main/kotlin/except/UnknownVersionException.kt | 9 +++++++++ 4 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 src/main/kotlin/UnknownVersionException.kt create mode 100644 src/main/kotlin/except/UnknownVersionException.kt (limited to 'src/main') diff --git a/src/main/kotlin/Connection.kt b/src/main/kotlin/Connection.kt index 61cbaae..911cb93 100644 --- a/src/main/kotlin/Connection.kt +++ b/src/main/kotlin/Connection.kt @@ -1,5 +1,6 @@ import except.MsizeValueTooBigException import except.RErrorException +import except.UnknownVersionException import java.io.IOException import java.math.BigInteger diff --git a/src/main/kotlin/ProtocolTranslator.kt b/src/main/kotlin/ProtocolTranslator.kt index ffa5f44..68dde3e 100644 --- a/src/main/kotlin/ProtocolTranslator.kt +++ b/src/main/kotlin/ProtocolTranslator.kt @@ -30,7 +30,7 @@ interface ProtocolTranslator { * @throws except.InvalidMessageException if the received message is invalid. * @throws except.RErrorException if the received message is an R-error message. * @throws except.MsizeValueTooBigException if the received `msize` value is bigger than what the client requested. - * @throws UnknownVersionException if the version negotiation failed. + * @throws except.UnknownVersionException if the version negotiation failed. */ fun version(msize: UInt, version: String) diff --git a/src/main/kotlin/UnknownVersionException.kt b/src/main/kotlin/UnknownVersionException.kt deleted file mode 100644 index 1f88a73..0000000 --- a/src/main/kotlin/UnknownVersionException.kt +++ /dev/null @@ -1,7 +0,0 @@ -/** - * This exception is thrown when the remote server sent either an "unknown" version back during the version negotiation - * procedure or a version unknown to this client implementation. - * - * @param version The version sent by the server. - */ -class UnknownVersionException(val version: String) : Exception("Unknown version: $version") \ No newline at end of file diff --git a/src/main/kotlin/except/UnknownVersionException.kt b/src/main/kotlin/except/UnknownVersionException.kt new file mode 100644 index 0000000..5023bc5 --- /dev/null +++ b/src/main/kotlin/except/UnknownVersionException.kt @@ -0,0 +1,9 @@ +package except + +/** + * This exception is thrown when the remote server sent either an "unknown" version back during the version negotiation + * procedure or a version unknown to this client implementation. + * + * @param version The version sent by the server. + */ +class UnknownVersionException(val version: String) : Exception("Unknown version: $version") \ No newline at end of file -- cgit v1.2.3