Skip to content
Snippets Groups Projects
Commit a6435107 authored by Adam Wardynski's avatar Adam Wardynski
Browse files

InvalidArgument exception.

parent 72f0dee2
No related branches found
No related tags found
No related merge requests found
......@@ -40,4 +40,22 @@ std::string FileNotFound::info() const
return ss.str();
}
InvalidArgument::InvalidArgument(const std::string &arg_name, const std::string &reason)
: WcclError(reason),
arg_name(arg_name),
reason(reason)
{
}
InvalidArgument::~InvalidArgument() throw()
{
}
std::string InvalidArgument::info() const
{
std::ostringstream ss;
ss << "Invalid argument " << arg_name << " : " << reason;
return ss.str();
}
} /* end ns Wccl */
......@@ -38,6 +38,19 @@ public:
std::string filename, paths, where;
};
class InvalidArgument : public WcclError
{
public:
InvalidArgument(const std::string& arg_name, const std::string& reason);
~InvalidArgument() throw();
std::string info() const;
std::string arg_name;
std::string reason;
};
} /* end ns Wccl */
#endif // LIBWCCL_EXCEPTION_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment