Added an usage example. Took care of std::length_error.