[dev-context] Error handling in modules?

Brooks Moses bmoses at stanford.edu
Sat Oct 1 22:48:59 CEST 2005


In LaTeX, there is a \PackageError macro for reporting errors from packages 
-- basically, it's just a standard way of creating a TeX-like error 
message, with a user-defined text, and the standard "?" prompt waiting for 
user intervention.

Is there a similarly standard way for producing error messages in ConTeXt 

For instance, right now one of my bits of code has the following:

      \doifdefinedelse{\??ma :columntype:#1}
        {\csname \??ma :columntype:#1\endcsname #2\@nil}
        {\error{Undefined column type: #1}}

I'd like to replace the \error in the last line with something that reports 
a more useful error message than "! Undefined control sequence."

- Brooks

More information about the dev-context mailing list