Added missing file
This commit is contained in:
23
include/atidlas/exception/unknown_datatype.h
Normal file
23
include/atidlas/exception/unknown_datatype.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef ATIDLAS_EXCEPTION_UNKNOWN_DATATYPE_H
|
||||
#define ATIDLAS_EXCEPTION_UNKNOWN_DATATYPE_H
|
||||
|
||||
#include <string>
|
||||
#include <exception>
|
||||
|
||||
namespace atidlas
|
||||
{
|
||||
|
||||
/** @brief Exception for the case the generator is unable to deal with the operation */
|
||||
class unknown_datatype : public std::exception
|
||||
{
|
||||
public:
|
||||
unknown_datatype(int);
|
||||
virtual const char* what() const throw();
|
||||
virtual ~unknown_datatype() throw();
|
||||
private:
|
||||
std::string message_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
16
lib/exception/unknown_datatype.cpp
Normal file
16
lib/exception/unknown_datatype.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include "atidlas/exception/unknown_datatype.h"
|
||||
#include "atidlas/tools/to_string.hpp"
|
||||
|
||||
namespace atidlas
|
||||
{
|
||||
|
||||
unknown_datatype::unknown_datatype(int v) :
|
||||
message_("ATIDLAS: The data-type provided was not recognized. The datatype code provided is " + tools::to_string(v)) {}
|
||||
|
||||
const char* unknown_datatype::what() const throw()
|
||||
{ return message_.c_str(); }
|
||||
|
||||
unknown_datatype::~unknown_datatype() throw()
|
||||
{}
|
||||
|
||||
}
|
Reference in New Issue
Block a user