[BASESRV]
[reactos.git] / include / c++ / exception
index 516803d..76af754 100644 (file)
@@ -1,66 +1,52 @@
-// Exception Handling support header for -*- C++ -*-
-
-#ifndef __EXCEPTION__
-#define __EXCEPTION__
-
-extern "C++" {
-
-namespace std
-{
-  /**
-   * @defgroup exceptions Exceptions
-   * @ingroup diagnostics
-   *
-   * Classes and functions for reporting errors via exception classes.
-   * @{
-   */
-
-  /**
-   *  @brief Base class for all library exceptions.
-   *
-   *  This is the base class for all exceptions thrown by the standard
-   *  library, and by certain language expressions.  You are free to derive
-   *  your own %exception classes, or use a different hierarchy, or to
-   *  throw non-class data (e.g., fundamental types).
-   */
-  class exception
-  {
-  public:
-    exception() throw() { }
-    virtual ~exception() throw();
-
-    /** Returns a C-style character string describing the general cause
-     *  of the current error.  */
-    virtual const char* what() const throw();
-  };
-
-  /** If an %exception is thrown which is not listed in a function's
-   *  %exception specification, one of these may be thrown.  */
-  class bad_exception : public exception
-  {
-  public:
-    bad_exception() throw() { }
-
-    virtual ~bad_exception() throw();
-
-    virtual const char* what() const throw();
-  };
-
-  typedef void (*unexpected_handler) ();
-
-  unexpected_handler set_unexpected(unexpected_handler) throw();
-
-  DECLSPEC_NORETURN void unexpected();
-
-  bool uncaught_exception() throw();
-
-  // @} group exceptions
-} // namespace std
-
-typedef void (*terminate_handler) ();
-terminate_handler set_terminate(terminate_handler) throw();
-DECLSPEC_NORETURN void terminate() throw();
-
-} // extern "C++"
-
-#endif
+// Exception Handling support header for -*- C++ -*-\r
+\r
+#ifndef __EXCEPTION__\r
+#define __EXCEPTION__\r
+\r
+extern "C++" {\r
+\r
+class exception\r
+{\r
+public:\r
+    exception() throw();\r
+    exception(const char * const &) throw();\r
+    exception(const char * const &, int) throw();\r
+\r
+    virtual ~exception() throw();\r
+\r
+    virtual const char *what() const throw();\r
+private:\r
+    const char *_name;\r
+    int _do_free;\r
+};\r
+\r
+class bad_exception : public exception\r
+{\r
+public:\r
+    bad_exception(const char *name = "bad exception") throw()\r
+        : exception(name) { }\r
+\r
+    virtual ~bad_exception() throw() { }\r
+};\r
+\r
+namespace std\r
+{\r
+    using ::exception;\r
+    using ::bad_exception;\r
+\r
+    typedef void (*unexpected_handler) ();\r
+\r
+    unexpected_handler set_unexpected(unexpected_handler) throw();\r
+\r
+    __MINGW_ATTRIB_NORETURN void unexpected();\r
+\r
+    bool uncaught_exception() throw();\r
+} // namespace std\r
+\r
+typedef void (*terminate_handler) ();\r
+terminate_handler set_terminate(terminate_handler) throw();\r
+__MINGW_ATTRIB_NORETURN void terminate() throw();\r
+\r
+} // extern "C++"\r
+\r
+#endif\r