hawkw / seax

A VM-based runtime environment for functional programming languages
http://hawkweisman.me/seax/
MIT License
45 stars 5 forks source link

Add line numbers for SVM error messages #47

Open hawkw opened 9 years ago

hawkw commented 9 years ago

The Java virtual machine has the ability to include line numbers in bytecode files so that when a runtime error takes place, the resultant stack trace can include references to the lines in the source code where the error happened. This can help a lot with debugging runtime errors.

It would be wickedly cool if Seax supported similar functionality. This might take some work to implement. It also might have negative performance implementations (just like #46), so it would be nice if it could be made conditional - a debug mode and an application/production mode, essentially.

Once again, just like #46, this is relatively low-priority right now. But it would be super cool.

hawkw commented 9 years ago

See also #20

hawkw commented 9 years ago

Also under consideration: consider making state.eval() return a Result<State, &str> or something rather than panicking; this way, error messages can be passed around and handled. Not sure if this would have significant performance implications though.