From bf5ffaf41b7bdd23a0127ed45f78a423e19d316f Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Mon, 10 Sep 2001 14:45:45 +0000 Subject: [PATCH] workaround for new ( std::no_throw ) Tornado II compiler bug check --- src/ca/cac.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ca/cac.cpp b/src/ca/cac.cpp index 0a7ede863..53129a567 100644 --- a/src/ca/cac.cpp +++ b/src/ca/cac.cpp @@ -171,9 +171,10 @@ cac::cac ( cacNotify & notifyIn, bool enablePreemptiveCallbackIn ) : tmp[0] = '\0'; } len = strlen ( tmp ) + 1; - this->pUserName = new char [len]; + // Tornado II doesnt like new ( std::nothrow ) + this->pUserName = new /*( std::nothrow )*/ char [ len ]; if ( ! this->pUserName ) { - throwWithLocation ( caErrorCode (ECA_ALLOCMEM) ); + throw std::bad_alloc (); } strncpy ( this->pUserName, tmp, len ); } @@ -234,7 +235,8 @@ cac::cac ( cacNotify & notifyIn, bool enablePreemptiveCallbackIn ) : } if ( ! enablePreemptiveCallbackIn ) { - this->pCallbackLocker = new ( std::nothrow ) callbackAutoMutex ( *this ); + // Tornado II doesnt like new ( std::nothrow ) + this->pCallbackLocker = new /*( std::nothrow )*/ callbackAutoMutex ( *this ); if ( ! this->pCallbackLocker ) { osiSockRelease (); delete [] this->pUserName;