diff --git a/src/libCom/osi/epicsEvent.cpp b/src/libCom/osi/epicsEvent.cpp index 91de03ddb..4d3dd4492 100644 --- a/src/libCom/osi/epicsEvent.cpp +++ b/src/libCom/osi/epicsEvent.cpp @@ -18,15 +18,16 @@ #include "epicsEvent.h" #include "epicsStdioRedirect.h" -/* - * exception payload - */ -class epicsEvent::invalidSemaphore : public std::exception +// vxWorks 5.4 gcc fails during compile when I use std::exception +using namespace std; + +// exception payload +class epicsEvent::invalidSemaphore : public exception { - const char * what () const; + const char * what () const throw (); }; -const char * epicsEvent::invalidSemaphore:: what () const +const char * epicsEvent::invalidSemaphore::what () const throw () { return "epicsEvent::invalidSemaphore()"; } @@ -61,7 +62,7 @@ void epicsEvent::wait () epicsEventWaitStatus status; status = epicsEventWait (this->id); if (status!=epicsEventWaitOK) { - throwWithLocation ( invalidSemaphore () ); + throw invalidSemaphore (); } } @@ -74,7 +75,7 @@ bool epicsEvent::wait (double timeOut) } else if (status==epicsEventWaitTimeout) { return false; } else { - throwWithLocation ( invalidSemaphore () ); + throw invalidSemaphore (); } return false; } @@ -88,7 +89,7 @@ bool epicsEvent::tryWait () } else if (status==epicsEventWaitTimeout) { return false; } else { - throwWithLocation ( invalidSemaphore () ); + throw invalidSemaphore (); } return false; } diff --git a/src/libCom/osi/epicsEvent.h b/src/libCom/osi/epicsEvent.h index a9ef9524f..635e7a4f6 100644 --- a/src/libCom/osi/epicsEvent.h +++ b/src/libCom/osi/epicsEvent.h @@ -23,8 +23,6 @@ typedef enum {epicsEventEmpty,epicsEventFull} epicsEventInitialState; #ifdef __cplusplus -#include "locationException.h" - class epicsShareClass epicsEvent { public: epicsEvent ( epicsEventInitialState initial = epicsEventEmpty );