It is a length error exception and some components of the standard library, such as vector and string also throw exceptions of this type to signal errors resizing.
Following is the declaration for std::length_error.
No-throw guarantee − no members throw exceptions.
constructor − what_arg has the same content as the value returned by member what.
what − It is used to get string identifying exception.