I got some errors when using EmberJson. Can anyone help?
$ mojo life.mojo
/mnt/Archive/Documents/Programming/Mojo/life/life.mojo:3:17: error: cannot call function that may raise in a context that cannot raise
var json = parse('{"key": 123}')
~~~~~^~~~~~~~~~~~~~~~
/mnt/Archive/Documents/Programming/Mojo/life/life.mojo:3:17: note: try surrounding the call in a 'try' block
var json = parse('{"key": 123}')
^
mojo: error: failed to parse the provided Mojo source module
The parse function can raise exceptions, so you much either mark the function containing it as raises as well, or wrap it in a try/except block to handle any possible errors.
Using the repo head is a bit risky from a stability standpoint. However, I can’t reproduce on my mac machine so I’ll have to try and boot up a Linux VM at some point.