[skip ci] Do not throw plain C string as exception
This commit is contained in:
@@ -122,17 +122,17 @@ MemDebug::MemDebug()
|
||||
|
||||
// Open a log file for the hook functions to use
|
||||
if ( logFile != NULL )
|
||||
throw "Base::MemDebug::MemDebug():38: Don't call the constructor by your self!";
|
||||
throw std::runtime_error("Base::MemDebug::MemDebug():38: Don't call the constructor by your self!");
|
||||
#if (_MSC_VER >= 1400)
|
||||
fopen_s( &logFile, "MemLog.txt", "w" );
|
||||
if ( logFile == NULL )
|
||||
throw "Base::MemDebug::MemDebug():41: File IO Error. Can't open log file...";
|
||||
throw std::runtime_error("Base::MemDebug::MemDebug():41: File IO Error. Can't open log file...");
|
||||
_strtime_s( timeStr, 15 );
|
||||
_strdate_s( dateStr, 15 );
|
||||
#elif (_MSC_VER >= 1200)
|
||||
logFile = fopen( "MemLog.txt", "w" );
|
||||
if ( logFile == NULL )
|
||||
throw "Base::MemDebug::MemDebug():41: File IO Error. Can't open log file...";
|
||||
throw std::runtime_error("Base::MemDebug::MemDebug():41: File IO Error. Can't open log file...");
|
||||
_strtime( timeStr );
|
||||
_strdate( dateStr );
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user