diff --git a/EXE_General.cpp b/EXE_General.cpp index c732e99..c494d43 100644 --- a/EXE_General.cpp +++ b/EXE_General.cpp @@ -59,11 +59,11 @@ ExeInit( int nDebug, const string& sLogFile, const string& sLogMsg) delete s_pGenLog ; // creo il logger generale - s_pGenLog = new Logger( ( nDebug > 0 ? LL_DEBUG : LL_INFO), "EgtInterface") ; + s_pGenLog = new( nothrow) Logger( ( nDebug > 0 ? LL_DEBUG : LL_INFO), "EgtInterface") ; if ( s_pGenLog == nullptr) return false ; // assegno il file - s_pGenLog->AddOutputStream( new ofstream( stringtoW( sLogFile)), true) ; + s_pGenLog->AddOutputStream( new( nothrow) ofstream( stringtoW( sLogFile)), true) ; // lo passo alle DLL SetEGnLogger( s_pGenLog) ; SetENkLogger( s_pGenLog) ; @@ -247,11 +247,11 @@ ExeSetCommandLogger( const string& sLogFile) delete s_pCmdLog ; s_bCmdLog = false ; // creo il logger dei comandi - s_pCmdLog = new Logger( LL_INFO, "EgtCommandLog") ; + s_pCmdLog = new( nothrow) Logger( LL_INFO, "EgtCommandLog") ; if ( s_pCmdLog == nullptr) return false ; // assegno il file - ofstream* pLogFile = new ofstream( stringtoW( sLogFile)) ; + ofstream* pLogFile = new( nothrow) ofstream( stringtoW( sLogFile)) ; if ( pLogFile == nullptr || pLogFile->bad()) return false ; s_pCmdLog->AddOutputStream( pLogFile, true) ;