Support for handling warnings and errors.
Many parts of VL can run into situations where we want to issue
warnings or cause errors. In these situations, VL creates vl-warning
objects. These warnings can be attached to major design elements such as
modules and interfaces. They can later be collected, examined, filtered,
New users: You may wish to see warning-basics for a broad
discussion of VL's philosophy toward handling warnings before looking at the
VL includes many functions for creating, collecting, printing, filtering,
and otherwise working with warnings.
- The core warning data structure is a vl-warning, but more often
these are found in a vl-warninglist, which are often called warnings
- For creating warnings, there are some convenient macros for extend
warnings accumulators with new warnings; see ok, warn, fatal. As a new alternative to warnings accumulators, see also vmsg,
vl-warning-add-ctx, and the special patbind-wmv binder for b*.
- Functions for displaying, filtering, etc. a warning list include:
- You can get a vl-reportcard that summarizes the warnings that
are attached to design elements such as modules, interfaces, etc. A report
card can also be printed, filtered, etc., see vl-reportcard for details.
You can alternately extract all of the warnings as a list of flat-warnings.
- Fatal warnings can be propagated throughout a design to transitively
any superior design elements as having fatal warnings somewhere below. See
- VL hackers may want to know about vl-trace-warnings, which just
traces warning creation in a nice way so that you can see warnings as
they are created (e.g., between print statements or other kinds of
- Warnings are heavily used in vl-lint, which features some special
mechanisms for suppressing warnings; see lint-warning-suppression.
- An attribute- mechanism for suppressing particular warnings
when using vl-lint.
- General introduction to vl-warning objects and error handling
- Fundamental warning object used throughout vl.
- (vl-warninglist-add-ctx x ctx) maps vl-warning-add-ctx across a list.
- (vl-warninglist->types x) maps vl-warning->type across a list.
- A mechanism for propagating fatal errors from submodules up to all
modules that rely on these submodules.
- A (typically fast) alist associating names to warnings.
- Check if any warning is marked as fatal.
- A transform to clean up all the warnings in a design.
- A filter for dropping warnings from whole modules (and other
design elements) based on filenames.
- Keep only warnings of certain types.
- Extend a warnings accumulator with a non-fatal warning.
- A list of vl-warning-p objects.
- Remove warnings of certain types.
- Extract flat lists of warnings from various design elements.
- Check if there are any warnings of certain types.
- Pretty-print a vl-warning.
- A convenient shorthand for calling vl-warninglist-fix.
- Pretty-print warnings as they are created.
- Extend a warnings accumulator with a fatal warning.
- Similar to msg; constructs a vl-msg that can be used
with ~@ directives in VL's formatted-printing routines.