-#ifndef MSG_EXCEPTION_HPP\r
-#define MSG_EXCEPTION_HPP\r
+/*\r
+ * MsgException.hpp\r
+ *\r
+ * Copyright 2006,2007 Martin Quinson, Malek Cherier \r
+ * All right reserved. \r
+ *\r
+ * This program is free software; you can redistribute \r
+ * it and/or modify it under the terms of the license \r
+ *(GNU LGPL) which comes with this package. \r
+ *\r
+ */ \r
+ \r
+#ifndef MSG_MSGEXCEPTION_HPP\r
+#define MSG_MSGEXCEPTION_HPP\r
\r
-namespace msg\r
+#include <Exception.hpp>\r
+\r
+namespace SimGrid\r
{\r
- class MsgException\r
+ namespace Msg\r
{\r
- public:\r
- // Default constructor.\r
- MsgException();\r
- \r
- // This constructor takes as parameter the message of the \r
- // MsgException object.\r
- MsgException(const char* msg);\r
- \r
- // Copy constructor.\r
- MsgException(const MsgException& rMsgException);\r
- \r
- // Destructor.\r
- virtual ~MsgException();\r
- \r
\r
- // Operations.\r
- \r
- // Returns the message of the exception.\r
- const char* what(void) const;\r
- \r
- \r
- // Getters/setters.\r
- \r
- // Operators.\r
+ class SIMGRIDX_EXPORT MsgException : public Exception\r
+ {\r
+ public:\r
+ \r
+ // Default constructor.\r
+ MsgException();\r
+ \r
+ // Copy constructor.\r
+ MsgException(const MsgException& rMsgException);\r
+ \r
+ // This constructor takes the reason of the exception.\r
+ MsgException(const char* reason);\r
+ \r
+ // Destructor.\r
+ virtual ~MsgException();\r
+ \r
+ // Operations.\r
+ \r
+ // Returns the reason of the exception :\r
+ // the message "Internal exception `reason'"\r
+ const char* toString(void) const;\r
+ \r
+ // Operators.\r
+ \r
+ // Assignement.\r
+ const MsgException& operator = (const MsgException& rMsgException);\r
+ \r
+ private :\r
+ \r
+ // Attributes.\r
+ \r
+ // A buffer used to build the message returned by the methode toString().\r
+ char* reason;\r
+ };\r
\r
- private:\r
\r
- // Attributes.\r
- \r
- // The message of the exception.\r
- const char* msg;\r
- \r
- };\r
-}\r
+ } // namespace Msg \r
+\r
+}// namespace SimGrid\r
+\r
+\r
+#endif // !MSG_MSGEXCEPTION_HPP\r
\r
-#endif // !MSG_EXCEPTION_HPP
\ No newline at end of file