Simplifying error handling code.