1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
6 * Created on: Apr 28, 2014
10 #include <Events_Error.h>
11 #include <Events_Loop.h>
13 Events_Error::Events_Error(char* theDescription, const void* theSender)
14 : Events_Message(Events_Error::errorID(), theSender)
16 myDescription = theDescription;
19 Events_Error::~Events_Error()
23 Events_ID Events_Error::errorID()
25 Events_Loop* aLoop = Events_Loop::loop();
26 return aLoop->eventByName("ApplicationError");
29 char* Events_Error::description() const
34 void Events_Error::send(char* theDescription, const void* theSender)
36 std::shared_ptr<Events_Message> aNewOne =
37 std::shared_ptr<Events_Message>(new Events_Error(theDescription, theSender));
38 Events_Loop::loop()->send(aNewOne);
41 void Events_Error::send(std::string theDescription, const void* theSender)
43 Events_Error::send((char*) theDescription.c_str(), theSender);