use location exception

This commit is contained in:
Jeff Hill
2000-03-01 00:05:53 +00:00
parent 34ee04b930
commit 3b41c114ea
3 changed files with 8 additions and 20 deletions
+3 -5
View File
@@ -71,6 +71,8 @@ epicsShareFunc void * epicsShareAPI threadPrivateGet (threadPrivateId);
#ifdef __cplusplus
#include "locationException.h"
class osiThread {
public:
osiThread (const char *name, unsigned stackSize,
@@ -200,11 +202,7 @@ inline osiThreadPrivate<T>::osiThreadPrivate ()
{
this->id = threadPrivateCreate ();
if (this->id == 0) {
# ifdef noExceptionsFromCXX
assert (this->id != 0);
# else
throw unableToCreateThreadPrivate ();
# endif
throwWithLocation ( unableToCreateThreadPrivate () );
}
}
+2 -5
View File
@@ -35,6 +35,7 @@
#include <limits.h>
#define epicsExportSharedSymbols
#include "locationException.h"
#include "epicsAssert.h"
#include "envDefs.h"
#include "osiTime.h"
@@ -259,11 +260,7 @@ osiTime::osiTime (const tm_nano_sec &tm)
ansiTimeTicks.ts = mktime (&tmp);
if (ansiTimeTicks.ts == mktimeFailure) {
# ifdef noExceptionsFromCXX
assert (0);
# else
throw formatProblemWithStructTM ();
# endif
throwWithLocation ( formatProblemWithStructTM () );
}
*this = osiTime (ansiTimeTicks);
+3 -10
View File
@@ -41,6 +41,7 @@
#include "epicsTypes.h"
#include "tsStamp.h"
#include "epicsAssert.h"
#include "locationException.h"
struct timespec; // POSIX real time
struct timeval; // BSD
@@ -264,11 +265,7 @@ inline osiTime osiTime::getCurrent ()
status = tsStampGetCurrent (&current);
if (status) {
# ifdef noExceptionsFromCXX
assert (0);
# else
throw unableToFetchCurrentTime ();
# endif
throwWithLocation ( unableToFetchCurrentTime () );
}
return osiTime (current);
@@ -281,11 +278,7 @@ inline osiTime osiTime::getEvent (const osiTimeEvent &event)
status = tsStampGetEvent (&current, event.eventNumber);
if (status) {
# ifdef noExceptionsFromCXX
assert (0);
# else
throw unableToFetchCurrentTime ();
# endif
throwWithLocation ( unableToFetchCurrentTime () );
}
return osiTime (current);