Use macro for error handling.