display packet ID in hexadecimal
All checks were successful
Build & Test / nix-build (push) Successful in 1m34s

This commit is contained in:
Kodi Craft 2024-09-06 12:45:05 +02:00
parent 6495a246e0
commit 9ec63487c2
Signed by: kodi
GPG Key ID: 69D9EED60B242822

View File

@ -80,8 +80,8 @@ alias ElixirSense.Log
case connstate.handle(packet, version, state) do
:ok -> state
{:error, reason} ->
Logger.error("Error handling packet with ID #{id} in state #{connstate}: #{reason}")
send(self(), {:disconnect, "§cError handling packet #{id}:\n#{reason}"})
Logger.error("Error handling packet with ID #{inspect(id, base: :hex)} in state #{connstate}: #{reason}")
send(self(), {:disconnect, "§cError handling packet #{inspect(id, base: :hex)}:\n#{reason}"})
state
newstate ->
if is_map(newstate) do
@ -93,8 +93,8 @@ alias ElixirSense.Log
end
rescue
e ->
Logger.error("Error handling packet with ID #{id} in state #{connstate}: #{Exception.format(:error, e, __STACKTRACE__)}")
send(self(), {:disconnect, "§cError handling packet #{id}:\n#{Exception.format(:error, e, __STACKTRACE__)}"})
Logger.error("Error handling packet with ID #{inspect(id, base: :hex)} in state #{connstate}: #{Exception.format(:error, e, __STACKTRACE__)}")
send(self(), {:disconnect, "§cError handling packet #{inspect(id, base: :hex)}:\n#{Exception.format(:error, e, __STACKTRACE__)}"})
state
end
end