1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
6 * Created on: Apr 28, 2014
10 #ifndef EVENTS_ERROR_H_
11 #define EVENTS_ERROR_H_
14 #include <Events_Message.h>
18 /**\class Events_Error
20 * \brief An error message event.
22 * Is generated by any algorithm or GUI of the application to inform the user about
23 * the problem. In GUI mode all such errors are collected in the message log window.
25 class EVENTS_EXPORT Events_Error : public Events_Message
27 char* myDescription; ///< pointer to the description of the error
30 /// default destructor
31 virtual ~Events_Error();
33 /// Identifier of this event (one for all errors)
34 static Events_ID errorID();
35 /// Specific error string
36 char* description() const;
37 /// Allows to send an error quickly: it creates and sends the error object automatically
38 static void send(char* theDescription, const void* theSender = 0);
39 /// Allows to send an error quickly: it creates and sends the error object automatically
40 static void send(std::string theDescription, const void* theSender = 0);
43 /// Default constructor. Use "send" message for generation an error.
44 Events_Error(char* theDescription, const void* theSender = 0);
47 #endif /* EVENTS_ERROR_H_ */