The exception class inherits directly from std::exception. But - your exceptions seem to be either runtime errors (file not found), or invalid arguments (e.g. passing a null extension) etc. So, inherit from the appropriate standard exception class. That would also remove the need for the base class with the string member - don't reinvent the wheel unless you have to.
The exception class inherits directly from
std::exception
. But - your exceptions seem to be either runtime errors (file not found), or invalid arguments (e.g. passing a null extension) etc. So, inherit from the appropriate standard exception class. That would also remove the need for the base class with the string member - don't reinvent the wheel unless you have to.