Initial commit.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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_ */
|
||||
Reference in New Issue
Block a user