Added an error macro for better error messages.