Graceful exception handling