class FileError : public StringError
{
public:
+ /** @param m Error message.
+ * @param f Name of the file that this exception concerns.
+ */
FileError (std::string m, std::string f)
: StringError (m)
, _file (f)
virtual ~FileError () throw () {}
+ /** @return name of the file that this exception concerns */
std::string file () const {
return _file;
}
private:
+ /** name of the file that this exception concerns */
std::string _file;
};
/** @param f File that we were trying to read from.
* @param e errno value, or 0.
*/
- ReadFileError (std::string f, int e)
+ ReadFileError (std::string f, int e = 0)
: FileError ("", f)
{
std::stringstream s;