clarity20 / tql

Terse Query Language
1 stars 0 forks source link

Introduce structured raising and handling of error codes #33

Open clarity20 opened 5 years ago

clarity20 commented 5 years ago

Eliminate magic-number return and exit codes. Introduce a structured system to raise error codes and diagnostic messages and propagate them up the call stack as needed.

There should be no hard exits from the TQL utility code, only the raising of error codes (not to be confused with signals) and immediate returns to mimic the throwing, rethrowing, and catching of exceptions as in Java and C++.

This should be done with an eye toward the possibility of having a more general logging mechanism complete with timestamps and severity indicators comparable to what log4j offers for Java applications.

clarity20 commented 5 years ago

Commit # 2d9e796 implements a clean protocol for error-handling and was pilot-tested on grammatical errors caught in lookupResultantTypeAndTrans().

Before retiring this issue we need to move beyond the pilot test to thorough coverage of the code.