tahoma2d/toonz/sources/include/texception.h

31 lines
635 B
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef T_EXCEPTION_INCLUDED
#define T_EXCEPTION_INCLUDED
#include "tcommon.h"
#undef DVAPI
#undef DVVAR
#ifdef TNZCORE_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
2016-06-15 18:43:10 +12:00
class DVAPI TException {
TString m_msg;
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
explicit TException(const std::string &msg = "Toonz Exception");
explicit TException(const std::wstring &msg) : m_msg(msg) {}
virtual ~TException() {}
virtual TString getMessage() const { return m_msg; }
2016-03-19 06:57:51 +13:00
};
// DVAPI ostream& operator<<(ostream &out, const TException &e);
2016-06-15 18:43:10 +12:00
#endif // T_EXCEPTION_INCLUDED