Is there a way to trap an error/warning in LaTeX during compile time? I'm thinking of something similar to the VB script
On Error Goto <blah>, but this time for LaTeX in something like
Sadly enough there are no standard error/warning-codes provided (AFAIK), since packages report warnings/error via the commands
By codes I mean, as an example,
- Warning 1:
- Warning 2:
- Error 1:
- Error 2:
Perhaps a missing \item...;
- Error 3:
File ended while scanning..., etc.
since one would ideally want to condition on the type of error/warning that is produced. Understandably a new error/warning reporting mechanism would be required, since package authors are allowed to issue warnings/errors as they please. So, there warnings/errors could be made package-specific with some number prefix (say
amsmath.warning.1 for warning 1 using the
If not in this version (probably), what about LaTeX3 (hopefully)?