add a `catch` builtin for catching fatal errors write tests