Some exception handling.