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
}
val payload = input.readSlice(length)
out += try {
decoder.decode(input.readSlice(length))
decoder.decode(payload)
} catch (ex: NotImplementedError) {
// TODO(gpe): remove this catch block when every packet is implemented
logger.warn { "Skipping unimplemented packet: ${decoder.javaClass}" }

Loading…
Cancel
Save