Unwrap uncaught errors

Depends on #3 merging first.

* [x] Add tests for reference, type and syntax errors
* [x] Figure out to how unwrap internal "uncaught error" into real exception type