Menu

Commit [r2540]  Maximize  Restore  History

A warning system for relax.

This is based on the system started in r2532, and is discussed in
detail in the thread starting:
https://mail.gna.org/public/relax-devel/2006-08/msg00071.html

The system is based on the standard Python warnings system.
Warnings are generated with the syntax:

warn(RelaxWarning(args))

where RelaxWarning can be any of the Warning classes defined in
errors.py, and args is an arbitrary number of arguments of
arbitrary type which are used by the Warning class to generate a
meaningful message string.

The system also impliments a --pedantic command-line flag, which
causes all warnings to be escalated to exceptions. All of the
relax warnings are subclasses of both BaseWarning and BaseError,
so the escalated exceptions will be caught by except clauses
based on these types.

A further feature in the current implimentation is to include
an exception-like traceback in the warning message when in
debug mode.

macraild 2006-08-17

changed /branches/warning/errors.py
changed /branches/warning/generic_fns/pdb.py
changed /branches/warning/relax
/branches/warning/errors.py Diff Switch to side-by-side view
Loading...
/branches/warning/generic_fns/pdb.py Diff Switch to side-by-side view
Loading...
/branches/warning/relax Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.