From 62db47bb6a6b2dbdff05d03a57c24cdf9e77d16c Mon Sep 17 00:00:00 2001 From: Edoardo La Greca Date: Thu, 7 Aug 2025 19:54:25 +0200 Subject: change version to use exceptions instead of error strings --- src/main/kotlin/ProtocolTranslator.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main/kotlin/ProtocolTranslator.kt') diff --git a/src/main/kotlin/ProtocolTranslator.kt b/src/main/kotlin/ProtocolTranslator.kt index eaa415f..f7b114f 100644 --- a/src/main/kotlin/ProtocolTranslator.kt +++ b/src/main/kotlin/ProtocolTranslator.kt @@ -27,9 +27,12 @@ interface ProtocolTranslator { * @param msize The maximum length, in bytes, that the client will ever generate or expect to receive in a single * 9P message. * @param version Should be "9P2000", which is the only defined value. - * @return a possible error. + * @throws InvalidMessageException if the received message is invalid. + * @throws RErrorException if the received message is an R-error message. + * @throws MsizeValueTooBigException if the received `msize` value is bigger than what the client requested. + * @throws UnknownVersionException if the version negotiation failed. */ - fun version(msize: UInt, version: String): String? + fun version(msize: UInt, version: String) /** * Perform authentication. -- cgit v1.2.3