#include <Events_Error.h>
#include <Events_Loop.h>
+#define THROW_EMPTY_AIS_EXCEPTION
+
Events_Error::Events_Error(const std::string& theDescription, const void* theSender)
: Events_Message(Events_Error::errorID(), theSender)
{
std::shared_ptr<Events_Message>(new Events_Error(theDescription, theSender));
Events_Loop::loop()->send(aNewOne);
}
+
+void Events_Error::throwException(const std::string& theDescription)
+{
+#ifdef THROW_EMPTY_AIS_EXCEPTION
+ try {
+ throw;
+ }
+ catch (...) {
+ Events_Error::send(
+ std::string("An exception: ") + theDescription);
+ }
+#endif
+}
\ No newline at end of file