Use try/catch for graceful exit rather than `throw`.