Support error handling in the message box