Elaborate exception handling.