src/include/error.h
changeset 490 ceb56ff9d07f
parent 489 afbdf8a3a633
child 491 4804c967543d
     1.1 --- a/src/include/error.h	Thu Apr 29 22:39:17 2004 +0000
     1.2 +++ b/src/include/error.h	Thu Apr 29 23:24:42 2004 +0000
     1.3 @@ -6,6 +6,7 @@
     1.4  //! \file
     1.5  //! \brief Basic error handling (signaling) routines.
     1.6  
     1.7 +#include <exception>
     1.8  #include <string>
     1.9  #include <sstream>
    1.10  
    1.11 @@ -27,7 +28,9 @@
    1.12    public:
    1.13      Exception() {}
    1.14      explicit Exception(const std::string &s) { buf << s; }
    1.15 -    Exception(const Exception &e) { buf << e.buf.str(); }
    1.16 +    Exception(const Exception &e) : std::exception() {
    1.17 +      buf << e.buf.str();
    1.18 +    }
    1.19      virtual ~Exception() throw() {}
    1.20      
    1.21      virtual const char* what() const throw() {
    1.22 @@ -56,8 +59,8 @@
    1.23     */
    1.24  
    1.25  # define FIXME(msg) \
    1.26 -    do { throw ::hugo::Exception("FIXME: " msg) << " (in: "    \
    1.27 -      << __FILE__ << ", " << __LINE__ << ")";                  \
    1.28 +    do { throw ::hugo::Exception() << "FIXME: " msg " (in: "    \
    1.29 +      __FILE__ ", " << __LINE__ << ")";                         \
    1.30      } while(false)
    1.31  
    1.32  }