OASIS-learn-study / minecraft-storeys-maker

Minecraft extension to make your own stories in, with and for Minecraft - it's like being a movie director!
https://www.learn.study
GNU Affero General Public License v3.0
14 stars 10 forks source link

Avoid printing stack trace for 'expected' JS errors #418

Closed vorburger closed 1 year ago

vorburger commented 1 year ago

@edewit something like this is what I meant... this is Draft, I'll still need to test that this works and logs as expected

vorburger commented 1 year ago

I'll still need to test that this works and logs as expected

With this it now prints the following instead of the "ugly" stack trace shown in #386:

[15:21:07 WARN] [ch.vorburger.minecraft.storeys.ScriptsLoader]: Invalid JS: /data/config/storeys-web/new-scripts/5153e34b-c326-3040-ab45-048f8f35eb13:24:-1 TypeError: e.whenEvent is not a function