Function lsst::pex::exceptions::LSST_EXCEPTION_TYPE(LogicError, Exception, lsst::pex::exceptions::LogicError)

Function Documentation

lsst::pex::exceptions::LSST_EXCEPTION_TYPE(LogicError, Exception, lsst::pex::exceptions::LogicError)

Reports errors in the logical structure of the program.

LogicError and its subclasses should be thrown to represent problems, such as violation of logical preconditions or class invariants, that are in principle preventable using defensive programming or other good practices. In many cases, it may not be appropriate to catch them.

This exception should be reserved for mathematical operations that are defined on a limited range of inputs. InvalidParameterError is more appropriate for non-mathematical operations.

See

RuntimeError

See

std::logic_error Reports arguments outside the domain of an operation.

See

std::domain_error