X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmException.h;h=1d0192c3cbe8b4288b6db399c139974ea7f511b1;hb=f41fb331c46df02fd4e284960f0473d7155573a2;hp=0938733be9b267d1a459c89c96c66bada8c2206a;hpb=953fdb8435f0957ba61cf9f0154ed0dc67d53981;p=gdcm.git diff --git a/src/gdcmException.h b/src/gdcmException.h index 0938733b..1d0192c3 100644 --- a/src/gdcmException.h +++ b/src/gdcmException.h @@ -16,6 +16,10 @@ #define GDCM_EXCEPTION_H #include +#ifdef _MSC_VER +using namespace std; // string type lives in the std namespace on VC++ +#endif + #include #include using namespace std; @@ -36,12 +40,6 @@ class GDCM_EXPORT gdcmException : public exception { /// error message string error; - /// exception caught within exception class: print error message and die - static void fatal(const char *from) throw(); - - /// try to discover this (dynamic) class name - virtual string getName() const throw(); - public: /** * Builds an exception with minimal information: name of the thrower @@ -55,7 +53,7 @@ class GDCM_EXPORT gdcmException : public exception { /** - * virtual descructor makes this class dynamic + * virtual destructor makes this class dynamic */ virtual ~gdcmException() { } @@ -74,6 +72,12 @@ class GDCM_EXPORT gdcmException : public exception { } + /// exception caught within exception class: print error message and die + static void fatal(const char *from) throw(); + + /// try to discover this (dynamic) class name + virtual string getName() const throw(); + friend ostream& operator<<(ostream &os, const gdcmException &e); };