std::logical error c++ code example
Example: logic_error
violation of logical preconditions or class invariants.
These errors are presumably detectable before
the program executes.
It is a assertion replacment in release build, in situation
when crashing is unacceptable option we can customize our
exception handling via this mechanism.