grain-lang / grain

The Grain compiler toolchain and CLI. Home of the modern web staple. 🌾
https://grain-lang.org/
GNU Lesser General Public License v3.0
3.26k stars 113 forks source link

Build AssertionError in Exception module #2165

Open spotandjake opened 1 week ago

spotandjake commented 1 week ago

Currently we build the assertion error in the compiler because of previous restrictions in the Exception module in the runtime. We should move this logic into the Exception module and have assertion error become AssertionError(String, Number) where String is the filename and Number is the line number. Notably once we implement exception catching the current approach would not work very well.