Simplified the exception code.