Flexible error handling.