Minimise code in the NotImplementedError catch block

I think this is slightly more readable.

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent 0016b8ab7d
commit 2c7cb5e054
  1. 3
      protocol/src/main/kotlin/org/openrs2/protocol/Rs2Decoder.kt

@ -63,8 +63,9 @@ public class Rs2Decoder(public var protocol: Protocol) : ByteToMessageDecoder()
return return
} }
val payload = input.readSlice(length)
out += try { out += try {
decoder.decode(input.readSlice(length)) decoder.decode(payload)
} catch (ex: NotImplementedError) { } catch (ex: NotImplementedError) {
// TODO(gpe): remove this catch block when every packet is implemented // TODO(gpe): remove this catch block when every packet is implemented
logger.warn { "Skipping unimplemented packet: ${decoder.javaClass}" } logger.warn { "Skipping unimplemented packet: ${decoder.javaClass}" }

Loading…
Cancel
Save