; error handling code for the system (in-package "VERRAZANO-COMMON") ; root error class (define-condition frontend-error (error)()) ; error generating temporary C file (define-condition tempcpp-error (frontend-error)()) ; an error running GCC-XML (define-condition gccxml-error (frontend-error)()) ; an error running the preprocessor (define-condition preprocessor-error (frontend-error)()) ; generate an error message (defgeneric generate-error-message (err)) ; generate an error message for unknown error (defmethod generate-error-message (err) (declare (ignore err)) "Unknown error occurred in the frontend.") ; generate an error message for temporary C++ file error (defmethod generate-error-message ((err tempcpp-error)) (declare (ignore err)) "An error occurred generating a temporary C++ file to pass to GCC-XML. Ensure that you have write permissions to the Verrazano temporary directory.") ; generate an error message for a GCC-XML error (defmethod generate-error-message ((err gccxml-error)) (declare (ignore err)) "An error occurred running GCC-XML. Please ensure that GCC-XML is properly installed and in your path, and please ensure that the library to which you are trying to bind is available to Verrazano.") ; generate an error message for a preprocessor error (defmethod generate-error-message ((err preprocessor-error)) (declare (ignore err)) "An error occurred running the C/C++ preprocessor. Please ensure that the C/C++ preprocessor is installed and available to Verrazano from the command line.")