This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
plasp/include/plasp/sas/ParserException.h
2016-05-20 15:29:24 +02:00

57 lines
991 B
C++

#ifndef __SAS__PARSER_EXCEPTION_H
#define __SAS__PARSER_EXCEPTION_H
#include <exception>
#include <string>
namespace plasp
{
namespace sas
{
////////////////////////////////////////////////////////////////////////////////////////////////////
//
// ParserException
//
////////////////////////////////////////////////////////////////////////////////////////////////////
class ParserException: public std::exception
{
public:
explicit ParserException()
{
}
explicit ParserException(const char *message)
: m_message(message)
{
}
explicit ParserException(const std::string &message)
: m_message(message)
{
}
~ParserException() throw()
{
}
const char *what() const throw()
{
if (m_message.empty())
return "Unspecified error while parsing SAS description file";
return m_message.c_str();
}
private:
std::string m_message;
};
////////////////////////////////////////////////////////////////////////////////////////////////////
}
}
#endif