Open rtulip opened 1 year ago
It would be great to be able to have errors report where they came from. imagine if we can update the assert function to take a string:
assert
fn assert(bool: cond Str:loc) { cond if { loc print ": Assertion failed" 1 exit } }
Then you could call assert like this:
fn foo(u64) { u64 10 < here assert // ... } foo(10) -> [file:0:0]: Assertion failed
Once we have string formatting, this could also be done with an error message
It would be great to be able to have errors report where they came from. imagine if we can update the
assert
function to take a string:Then you could call
assert
like this:Once we have string formatting, this could also be done with an error message