mucklet / mucklet-client

Web client for Mucklet.com, a textual world of roleplay.
Apache License 2.0
5 stars 8 forks source link

Error in command execution leads to just newline in the chat text entry box #245

Open ItsAKelmi opened 7 months ago

ItsAKelmi commented 7 months ago

While working through #87 I noted that if a command callback throws an error, the text box isn't cleared and the newline remains. There should probably be some error handling around the execution of command code in whatever module is responsible for executing commands based on chat input. To at least handle the situation in a way that's transparent to the user.

Very minor issue, but since it's possible that a player might encounter it, it should at least be looked at I think.

anisus commented 7 months ago

Yes. We could probably wrap the call and show a toaster error (using the Toaster module). In addition, we should still make sure it also ends up in the console with stack trace and all.