Most of the tests were catching exceptions are calling e.what() and discarding the result. Also, a lot of the tests were returning e.errorCode(), but unfortunately throwing the form of NcException where e.errorCode() == 0.
Two things to consider:
defaulting NcException::ec to EXIT_FAILURE or other non-zero value.
using a testing framework like googletest or catch2. The current tests report a maximum of one error per test, but with one of those frameworks, multiple errors could be caught per run.
Most of the tests were catching exceptions are calling
e.what()
and discarding the result. Also, a lot of the tests were returninge.errorCode()
, but unfortunately throwing the form ofNcException
wheree.errorCode() == 0
.Two things to consider:
NcException::ec
toEXIT_FAILURE
or other non-zero value.