Version 2 (modified by cameron, 11 years ago) (diff)


Error Handling Architecture

These are working notes on the development of the error handling architecture for Parabix. Notes initiated July 11, 2008 by RDC.

  1. Error Action Architecture
  2. Error Classification Architecture

Error Action Architecture

Currently, Parabix simply provides an error message and exits on encountering a syntax, well-formedness or validation error.

A better error action architecture is needed. Ideally, exception handling could be used, but C++ exception handling imposes too much overhead for a high-performance engine.

One area to investigate is the use of setjmp/longjmp for error handling. The critical issue is how to arrange for the release of resources from deep inside the parsing engine when longjmp is used.

An interesting architectural possibility would be to provide a Parabix error-handling resource located on the web, say using Under certain circumstances, a link to a page for a particular error could be displayed to the user. The page could actually be a wiki for users to discuss how the error may be resolved or worked around.

Error Classification Architecture

XML Parsing Errors

The source file xml_error.h classifies XML parsing errors into syntax errors and constraint errors. Syntax errors represent errors in the syntax of a particular XML production rule. The XML_NonTerminal enumeration is used to identify these errors, using actual XML nonterminal names.

Constraint errors are divided into two types: well-formedness constraints and validity constraints. These are respectively identified by labels having the prefix "wfErr_" and "vErr" in the XML_Constraint enumeration. The actual labels are derived from the anchor targets in the XML1.0 specification and could hence be used as the basis for hyperlinking if that were desirable.

Implementation Limit Errors

Parabix needs a systematic approach to dealing with implementation limits.

System Errors

Parabix needs a systematic approach to dealing with system errors, e.g., errors in opening files and so on.