FondationSTaBLFoundation / MOR2Issues

0 stars 0 forks source link

modBy 0 1 results in a blank screen instead of showing the error #3

Open rsninja722 opened 2 years ago

rsninja722 commented 2 years ago

if a modBy function ends up performing a divide by 0, the project when ran will be a blank screen with no error, to find the error, one has to look in the browser console to see the following error:

error

the project looks like this after hitting run

project

rsninja722 commented 2 years ago

Also if a modBy 0 error occurs while the project is running, it will freeze and the console will be flooded with a similar error. Would there be some way to have a try {} catch () {} for these currently invisible errors, and show them to the user?

CSchank commented 2 years ago

This is actually an Elm error which is kind of beyond the scope of what we can really handle as far as I know. This is one of the very few cases which break away from Elm's guarantee of no runtime errors, unfortunately :( They're still practically nonexistent, especially compared to something like JavaScript by itself.

CSchank commented 2 years ago

Good catch though!