marko-js / run

The Marko application framework
MIT License
142 stars 9 forks source link

Error handling #56

Closed rturnq closed 1 year ago

rturnq commented 1 year ago

Description

Improve error handling in dev mode when an error occurs during route building. Previously errors here would tend to crash the process. Now the error is used to generate a router which serves an error page for every request that contains the error stack. This allows the user to see the error and the Vite web socket to be connected which means the page will reload when the error is resolved without user intervention. In production mode, the error is still thrown right away which stops the build.

Motivation and Context

Screenshots (if appropriate):

Checklist: