Handling exceptions in operation