The library should throw an exception when a class invariant is not satisfied or a function cannot execute correctly.