thepeacockproject / Peacock

The Peacock Project is a HITMAN™ World of Assassination trilogy server replacement.
https://thepeacockproject.org
GNU Affero General Public License v3.0
367 stars 57 forks source link

Print stacktrace for uncaught errors in plugins #466

Closed grappigegovert closed 4 months ago

grappigegovert commented 4 months ago

There have been a few people trying to make plugins recently that are (I assume) beginning coders, posting some errors with their plugins. Currently, we only print Error while evaluating plugin, and the error message, which is not super helpful.

This PR changes that to include a stack trace for the error. Example: example1

I thought about trimming the stack trace to only call sites in the plugin, but I'm not sure if that's a good idea.

grappigegovert commented 4 months ago

The stack trace looks slightly different when running the built version of course: example2

AnthonyFuller commented 4 months ago

I'm glad someone's finally got around to it!

RDIL commented 4 months ago

Great change, thanks!