parserImport XOCL; /****************************************************************************** * * * Compilation Errors * * ------------------ * * * * Compilation errors are created by the compiler when something goes wrong. * * Clients of the compiler can then investigate the errors. * * * ******************************************************************************/ context Compiler @Class CompilationError // A string describing what went wrong... @Attribute message : String end // The resource that was being compiled when the // error occurred... @Attribute resource : String end // An optional exception that was caught by the // compiler when the error was created... @Attribute exception : Exception end @Constructor(message,resource) ! end @Constructor(message,resource,exception) end @Operation pprint(out) format(out,"~S in ~S",Seq{message,resource}); if exception <> null then xmf.raise(exception) end end end