Currently the only exceptions that a Lua function can throw is std::invalid_argument. But sometimes this is not enough, because although we technically can use std::invalid_argument for different applications, it's better to use dedicated exceptions for their own purposes. std::invalid_argument - for invalid arguments, std::logic_error - for common cases. This PR also allows to create new exception types and use them with the argument parser.
Currently the only exceptions that a Lua function can throw is std::invalid_argument. But sometimes this is not enough, because although we technically can use std::invalid_argument for different applications, it's better to use dedicated exceptions for their own purposes. std::invalid_argument - for invalid arguments, std::logic_error - for common cases. This PR also allows to create new exception types and use them with the argument parser.