diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index 46f8bdeaa..0a7ede863 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -213,7 +213,7 @@ cac::cac ( cacNotify & notifyIn, bool enablePreemptiveCallbackIn ) : if ( ! this->tcpSmallRecvBufFreeList ) { osiSockRelease (); delete [] this->pUserName; - throwWithLocation ( caErrorCode ( ECA_ALLOCMEM ) ); + throw std::bad_alloc (); } freeListInitPvt ( &this->tcpLargeRecvBufFreeList, this->maxRecvBytesTCP, 1 ); @@ -221,7 +221,7 @@ cac::cac ( cacNotify & notifyIn, bool enablePreemptiveCallbackIn ) : osiSockRelease (); delete [] this->pUserName; freeListCleanup ( this->tcpSmallRecvBufFreeList ); - throwWithLocation ( caErrorCode ( ECA_ALLOCMEM ) ); + throw std::bad_alloc (); } this->pTimerQueue = & epicsTimerQueueActive::allocate ( false, abovePriority ); @@ -230,7 +230,7 @@ cac::cac ( cacNotify & notifyIn, bool enablePreemptiveCallbackIn ) : delete [] this->pUserName; freeListCleanup ( this->tcpSmallRecvBufFreeList ); freeListCleanup ( this->tcpLargeRecvBufFreeList ); - throwWithLocation ( caErrorCode ( ECA_ALLOCMEM ) ); + throw std::bad_alloc (); } if ( ! enablePreemptiveCallbackIn ) { @@ -241,7 +241,7 @@ cac::cac ( cacNotify & notifyIn, bool enablePreemptiveCallbackIn ) : freeListCleanup ( this->tcpSmallRecvBufFreeList ); freeListCleanup ( this->tcpLargeRecvBufFreeList ); this->pTimerQueue->release (); - throwWithLocation ( caErrorCode ( ECA_ALLOCMEM ) ); + throw std::bad_alloc (); } } }