43 lines
666 B
C++
43 lines
666 B
C++
/*
|
|
* TfException.h
|
|
*
|
|
* Created on: 11.06.2014
|
|
* Author: matzman
|
|
*/
|
|
|
|
#ifndef TFEXCEPTION_H_
|
|
#define TFEXCEPTION_H_
|
|
|
|
|
|
#include <tfcppsimple/TfTypes.h>
|
|
#include <exception>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
|
|
|
|
namespace tfcppsimple {
|
|
|
|
class TfException : public std::runtime_error {
|
|
public:
|
|
TfException(std::string message)
|
|
: std::runtime_error(message) {}
|
|
};
|
|
|
|
class TfError : public TfException {
|
|
private:
|
|
TfErrorCode errorCode;
|
|
public:
|
|
TfError(std::string message, TfErrorCode code)
|
|
: TfException(message), errorCode(code) {}
|
|
|
|
TfErrorCode getErrorCode() { return errorCode; }
|
|
};
|
|
|
|
|
|
} // end namespace tfcppsimple
|
|
|
|
|
|
|
|
|
|
#endif /* TFEXCEPTION_H_ */
|