Skip to content
Snippets Groups Projects
Exceptions.h 403 B
Newer Older
Hoop77's avatar
Hoop77 committed
#ifndef EXCEPTIONS_H
#define EXCEPTIONS_H
namespace car
{
Hoop77's avatar
Hoop77 committed
class MissingParameters : public std::exception
{
    virtual const char * what() const throw()
    {
        return "Found too few paramters!";
    }
};
Hoop77's avatar
Hoop77 committed
class FileNotFound : public std::runtime_error
{
Hoop77's avatar
-  
Hoop77 committed
public:
    explicit FileNotFound(const std::string & filename)
        : runtime_error("File not found: " + filename)
    {}
Hoop77's avatar
Hoop77 committed
};