mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-28 11:50:53 +00:00
Changed: Exceptions catched by reference
This commit is contained in:
parent
e832ead7ad
commit
c29518b355
154 changed files with 412 additions and 412 deletions
|
@ -201,7 +201,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ifile.serialCont (container);
|
||||
ifile.close ();
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
// clear the container because it can contains partially loaded sheet so we must clean it before continue
|
||||
container.clear ();
|
||||
|
@ -456,7 +456,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ofile.close ();
|
||||
}
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlinfo ("loadForm(): Exception during saving the packed file, it will be recreated next launch (%s)", e.what());
|
||||
}
|
||||
|
@ -564,7 +564,7 @@ void loadForm2(const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ifile.serialPtrCont (container);
|
||||
ifile.close ();
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
// clear the container because it can contains partially loaded sheet so we must clean it before continue
|
||||
container.clear ();
|
||||
|
@ -819,7 +819,7 @@ void loadForm2(const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ofile.close ();
|
||||
}
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlinfo ("loadForm(): Exception during saving the packed file, it will be recreated next launch (%s)", e.what());
|
||||
}
|
||||
|
@ -925,7 +925,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ifile.serialCont (container);
|
||||
ifile.close ();
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
// clear the container because it can contains partially loaded sheet so we must clean it before continue
|
||||
container.clear ();
|
||||
|
@ -1183,7 +1183,7 @@ void loadForm (const std::vector<std::string> &sheetFilters, const std::string &
|
|||
ofile.close ();
|
||||
}
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlinfo ("loadForm(): Exception during saving the packed file, it will be recreated next launch (%s)", e.what());
|
||||
}
|
||||
|
|
|
@ -261,7 +261,7 @@ inline bool loadXmlPrimitiveFile(CPrimitives &primDoc, const std::string &fileNa
|
|||
// Read it
|
||||
return primDoc.read (xmlIn.getRootNode (), NLMISC::CFile::getFilename(fileName).c_str(), ligoConfig);
|
||||
}
|
||||
catch(NLMISC::Exception e)
|
||||
catch(const NLMISC::Exception &e)
|
||||
{
|
||||
nlwarning("Error reading input file '%s': '%s'", fileName.c_str(), e.what());
|
||||
return false;
|
||||
|
@ -294,7 +294,7 @@ inline bool saveXmlPrimitiveFile(CPrimitives &primDoc, const std::string &fileNa
|
|||
|
||||
// return xmlSaveFile(fileName.c_str(), xmlDoc) != -1;
|
||||
}
|
||||
catch(NLMISC::Exception e)
|
||||
catch(const NLMISC::Exception &e)
|
||||
{
|
||||
nlwarning("Error writing output file '%s': '%s'", fileName.c_str(), e.what());
|
||||
return false;
|
||||
|
|
|
@ -524,7 +524,7 @@ namespace NLNET
|
|||
// run the module task command control to module task method
|
||||
(_Module->*_TaskMethod)();
|
||||
}
|
||||
catch (NLMISC::Exception e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlwarning("In module task '%s', exception '%e' thrown", typeid(this).name(), e.what());
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ int main (int /* argc */, char ** /* argv */)
|
|||
{
|
||||
nlerror ("nlerror() %d", 4);
|
||||
}
|
||||
catch(EFatalError &)
|
||||
catch(const EFatalError &)
|
||||
{
|
||||
// just continue...
|
||||
nlinfo ("nlerror() generated an EFatalError exception, just ignore it");
|
||||
|
|
|
@ -109,7 +109,7 @@ int main (int argc, char **argv)
|
|||
CInetAddress addr(LSHost+":3333");
|
||||
Client->connect(addr);
|
||||
}
|
||||
catch(ESocket &e)
|
||||
catch(const ESocket &e)
|
||||
{
|
||||
printf("%s\n", e.what());
|
||||
return 0;
|
||||
|
|
|
@ -101,7 +101,7 @@ public:
|
|||
{
|
||||
fsPort = IService::ConfigFile.getVar("FSPort").asInt();
|
||||
}
|
||||
catch ( EUnknownVar& )
|
||||
catch (const EUnknownVar&)
|
||||
{
|
||||
}
|
||||
_FServer.init(fsPort);
|
||||
|
@ -148,7 +148,7 @@ public:
|
|||
{
|
||||
fesPort = IService5::ConfigFile.getVar("FESPort").asInt();
|
||||
}
|
||||
catch ( EUnknownVar& )
|
||||
catch (const EUnknownVar&)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -232,7 +232,7 @@ void cbInit (CMessage &msgin, TSockId from, CCallbackNetBase &netbase)
|
|||
{
|
||||
UdpSock->connect( CInetAddress (ServerAddr, UDPPort) );
|
||||
}
|
||||
catch ( Exception& e )
|
||||
catch (const Exception &e)
|
||||
{
|
||||
InfoLog->displayRawNL ("Cannot connect to remote UDP host '%s': %s", ServerAddr.c_str(), e.what() );
|
||||
exit ("");
|
||||
|
@ -291,7 +291,7 @@ int main( int argc, char **argv )
|
|||
|
||||
InfoLog->displayRawNL ("Waiting the server answer...");
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
InfoLog->displayRawNL ("Can't connect to %s:%d (%s)\n", ServerAddr.c_str(), TCPPort, e.what());
|
||||
exit ("");
|
||||
|
|
|
@ -108,7 +108,7 @@ void CReceiveTask::run()
|
|||
DataSock->receivedFrom( _ReceivedMessage.userDataW(), _DatagramLength, _ReceivedMessage.AddrFrom );
|
||||
d = CTime::getLocalTime ();
|
||||
}
|
||||
catch ( ESocket& )
|
||||
catch (const ESocket&)
|
||||
{
|
||||
// Remove the client corresponding to the address
|
||||
_ReceivedMessage.setTypeEvent( TReceivedMessage::RemoveClient );
|
||||
|
|
|
@ -85,7 +85,7 @@ void Init()
|
|||
AudioMixer->getListener()->setOrientation( frontvec, upvec );
|
||||
|
||||
}
|
||||
catch( Exception& e )
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlerror( "Error: %s", e.what() );
|
||||
}
|
||||
|
|
|
@ -227,7 +227,7 @@ bool CAnimationSet::loadFromFiles(const std::string &path, bool recurse /* = tru
|
|||
iFile.close();
|
||||
|
||||
}
|
||||
catch (NLMISC::EStream &e)
|
||||
catch (const NLMISC::EStream &e)
|
||||
{
|
||||
if (wantWarningMessage)
|
||||
{
|
||||
|
|
|
@ -338,7 +338,7 @@ void CAsyncFileManager3D::CMeshLoad::run()
|
|||
// Finally affect the pointer (Trans-Thread operation -> this operation must be atomic)
|
||||
*_ppShp = mesh.getShapePointer();
|
||||
}
|
||||
catch(EPathNotFound &)
|
||||
catch(const EPathNotFound &)
|
||||
{
|
||||
nlwarning ("Couldn't load '%s'", MeshName.c_str());
|
||||
*_ppShp = (IShape*)-1;
|
||||
|
@ -382,7 +382,7 @@ void CAsyncFileManager3D::CIGLoad::run (void)
|
|||
|
||||
*_ppIG = pIG;
|
||||
}
|
||||
catch(EPathNotFound &)
|
||||
catch(const EPathNotFound &)
|
||||
{
|
||||
nlwarning ("Couldn't load '%s'", _IGName.c_str());
|
||||
*_ppIG = (CInstanceGroup*)-1;
|
||||
|
@ -429,7 +429,7 @@ void CAsyncFileManager3D::CIGLoadUser::run (void)
|
|||
return;
|
||||
}
|
||||
}
|
||||
catch(EPathNotFound &)
|
||||
catch(const EPathNotFound &)
|
||||
{
|
||||
nlwarning ("Couldn't load '%s'", _IGName.c_str());
|
||||
delete pIG;
|
||||
|
|
|
@ -1600,7 +1600,7 @@ bool CDriverD3D::setDisplay(nlWindow wnd, const GfxMode& mode, bool show, bool r
|
|||
_EventEmitter.addEmitter(diee, true);
|
||||
}
|
||||
}
|
||||
catch(EDirectInput &e)
|
||||
catch(const EDirectInput &e)
|
||||
{
|
||||
nlinfo(e.what());
|
||||
}
|
||||
|
|
|
@ -929,7 +929,7 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
|
|||
_EventEmitter.addEmitter(diee, true);
|
||||
}
|
||||
}
|
||||
catch(EDirectInput &e)
|
||||
catch(const EDirectInput &e)
|
||||
{
|
||||
nlinfo(e.what());
|
||||
}
|
||||
|
|
|
@ -1746,7 +1746,7 @@ void CDriverUser::loadHLSBank(const std::string &fileName)
|
|||
throw EPathNotFound(path);
|
||||
fIn.serial(*hlsBank);
|
||||
}
|
||||
catch(Exception &)
|
||||
catch(const Exception &)
|
||||
{
|
||||
delete hlsBank;
|
||||
throw;
|
||||
|
|
|
@ -1291,7 +1291,7 @@ bool CPSConstraintMesh::update(std::vector<sint> *numVertsVect /*= NULL*/)
|
|||
{
|
||||
_ModelBank->load(_MeshShapeFileName[k]);
|
||||
}
|
||||
catch (NLMISC::EPathNotFound &)
|
||||
catch (const NLMISC::EPathNotFound &)
|
||||
{
|
||||
nlwarning("mesh not found : %s; used as a constraint mesh particle", _MeshShapeFileName[k].c_str());
|
||||
// shape not found, so not present in the shape bank -> we create a dummy shape
|
||||
|
|
|
@ -50,12 +50,12 @@ static inline void GetTextureSize(ITexture *tex, uint &width, uint &height)
|
|||
width = srcWidth;
|
||||
height = srcHeight;
|
||||
}
|
||||
catch (NLMISC::EPathNotFound &e)
|
||||
catch (const NLMISC::EPathNotFound &e)
|
||||
{
|
||||
nlinfo("%s", e.what());
|
||||
width = height = 0;
|
||||
}
|
||||
catch (NLMISC::EStream &e)
|
||||
catch (const NLMISC::EStream &e)
|
||||
{
|
||||
nlinfo("unable to load size from a bitmap ! name = %s", tf->getFileName().c_str());
|
||||
nlinfo("reason = %s", e.what());
|
||||
|
|
|
@ -1573,7 +1573,7 @@ void CTileSet::loadTileVegetableDesc()
|
|||
// load the TileVegetableDesc
|
||||
f.serial(_TileVegetableDesc);
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlinfo("Error loading TileVegetableDesc: %s", e.what());
|
||||
}
|
||||
|
|
|
@ -3080,13 +3080,13 @@ void CZoneLighter::lightWater(CWaterShape &ws, const CMatrix &MT, const CLightDe
|
|||
diffuseTex->writeTGA(of, 24);
|
||||
of.close();
|
||||
}
|
||||
catch (NLMISC::Exception &)
|
||||
catch (const NLMISC::Exception &)
|
||||
{
|
||||
nlwarning("Zone lighter : while lighting a water shape, writing %s failed! ", texFileName.c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(NLMISC::Exception &e)
|
||||
catch(const NLMISC::Exception &e)
|
||||
{
|
||||
nlwarning("Water shape lighting failed !");
|
||||
nlwarning(e.what());
|
||||
|
|
|
@ -541,7 +541,7 @@ bool CZoneBank::addElement (const std::string &elementName, std::string &error)
|
|||
error = "Can't open file " + elementName;
|
||||
}
|
||||
}
|
||||
catch (Exception& e)
|
||||
catch (const Exception& e)
|
||||
{
|
||||
error = "Error while loading ligozone "+elementName+" : "+e.what();
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ bool ICommand::execute (const std::string &commandWithArgs, CLog &log, bool quie
|
|||
{
|
||||
return CCommandRegistry::getInstance().execute(commandWithArgs, log, quiet, human);
|
||||
}
|
||||
catch(exception e)
|
||||
catch(const exception &e)
|
||||
{
|
||||
log.displayNL("Command '%s' thrown an exception :", commandWithArgs.c_str());
|
||||
log.displayNL(e.what());
|
||||
|
|
|
@ -84,7 +84,7 @@ bool loadStringFile(const std::string filename, vector<TStringInfo> &stringInfos
|
|||
buffer = new uint8[size];
|
||||
fp.serialBuffer(buffer, size);
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlinfo("Can't open file [%s] (%s)\n", filename.c_str(), e.what());
|
||||
return true;
|
||||
|
|
|
@ -419,7 +419,7 @@ namespace NLMISC
|
|||
}
|
||||
}
|
||||
}
|
||||
catch(EStream &)
|
||||
catch(const EStream &)
|
||||
{
|
||||
nlwarning("CInterWindowMsgQueue : Bad message format in inter window communication");
|
||||
}
|
||||
|
|
|
@ -55,7 +55,7 @@ bool CWordsDictionary::init( const string& configFileName )
|
|||
cf.load( configFileName );
|
||||
cfFound = true;
|
||||
}
|
||||
catch ( EConfigFile& e )
|
||||
catch (const EConfigFile &e)
|
||||
{
|
||||
nlwarning( "WD: %s", e.what() );
|
||||
}
|
||||
|
|
|
@ -451,7 +451,7 @@ void CClientReceiveTask::run()
|
|||
|
||||
NbLoop++;
|
||||
}
|
||||
catch ( ESocket& )
|
||||
catch (const ESocket&)
|
||||
{
|
||||
LNETL1_DEBUG( "LNETL1: Client connection %s broken", sockId()->asString().c_str() );
|
||||
sockId()->Sock->disconnect();
|
||||
|
|
|
@ -829,7 +829,7 @@ void CListenTask::run()
|
|||
|
||||
NbLoop++;
|
||||
}
|
||||
catch ( ESocket& e )
|
||||
catch (const ESocket &e)
|
||||
{
|
||||
LNETL1_INFO( "LNETL1: Exception in listen thread: %s", e.what() );
|
||||
// It can occur when too many sockets are open (e.g. 885 connections)
|
||||
|
@ -1131,12 +1131,12 @@ void CServerReceiveTask::run()
|
|||
*/
|
||||
}
|
||||
}
|
||||
// catch ( ESocketConnectionClosed& )
|
||||
// catch (const ESocketConnectionClosed&)
|
||||
// {
|
||||
// LNETL1_DEBUG( "LNETL1: Connection %s closed", serverbufsock->asString().c_str() );
|
||||
// // The socket went to _Connected=false when throwing the exception
|
||||
// }
|
||||
catch ( ESocket& )
|
||||
catch (const ESocket&)
|
||||
{
|
||||
LNETL1_DEBUG( "LNETL1: Connection %s broken", serverbufsock->asString().c_str() );
|
||||
(*ic)->Sock->disconnect();
|
||||
|
|
|
@ -280,7 +280,7 @@ void CCallbackClient::connect( const CInetAddress& addr )
|
|||
_MR_Recorder.recordNext( _MR_UpdateCounter, Connecting, _BufSock, addrmsg );
|
||||
}
|
||||
}
|
||||
catch ( ESocketConnectionFailed& )
|
||||
catch (const ESocketConnectionFailed&)
|
||||
{
|
||||
if ( _MR_RecordingState == Record )
|
||||
{
|
||||
|
|
|
@ -349,17 +349,17 @@ void CLoginServer::init (const string &listenAddress)
|
|||
try {
|
||||
cfcbDefaultUserPriv(IService::getInstance()->ConfigFile.getVar("DefaultUserPriv"));
|
||||
IService::getInstance()->ConfigFile.setCallback("DefaultUserPriv", cfcbDefaultUserPriv);
|
||||
} catch(Exception &) { }
|
||||
} catch(const Exception &) { }
|
||||
|
||||
try {
|
||||
cfcbAcceptInvalidCookie (IService::getInstance()->ConfigFile.getVar("AcceptInvalidCookie"));
|
||||
IService::getInstance()->ConfigFile.setCallback("AcceptInvalidCookie", cfcbAcceptInvalidCookie);
|
||||
} catch(Exception &) { }
|
||||
} catch(const Exception &) { }
|
||||
|
||||
try {
|
||||
cfcbTimeBeforeEraseCookie (IService::getInstance()->ConfigFile.getVar("TimeBeforeEraseCookie"));
|
||||
IService::getInstance()->ConfigFile.setCallback("TimeBeforeEraseCookie", cfcbTimeBeforeEraseCookie);
|
||||
} catch(Exception &) { }
|
||||
} catch(const Exception &) { }
|
||||
|
||||
// setup the listen address
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ namespace NLNET
|
|||
_onProcessModuleMessage(currentSender, currentMessage);
|
||||
_CurrentMessageFailed = false;
|
||||
}
|
||||
catch (NLMISC::Exception e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlwarning("In module task '%s' (cotask message receiver), exception '%e' thrown", typeid(this).name(), e.what());
|
||||
// an exception have been thrown
|
||||
|
|
|
@ -109,7 +109,7 @@ namespace NLNET
|
|||
sd->serial(s);
|
||||
}
|
||||
}
|
||||
catch(EStreamOverflow e)
|
||||
catch(const EStreamOverflow &)
|
||||
{
|
||||
// FAILED to read the security block, rewind to old pos and serial as unknow
|
||||
nlwarning("Error while reading stream for security data type %u", dataTag);
|
||||
|
|
|
@ -684,7 +684,7 @@ namespace NLNET
|
|||
route->CallbackClient.connect(addr);
|
||||
nldebug("CGatewayL3ClientTransport : Connected to %s with connId %u", addr.asString().c_str(), connId);
|
||||
}
|
||||
catch (ESocketConnectionFailed e)
|
||||
catch (const ESocketConnectionFailed &)
|
||||
{
|
||||
nlinfo("CGatewayL3ClientTransport : Failed to connect to server %s, retrying in %u seconds", addr.asString().c_str(), _RetryInterval);
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ void CNetDisplayer::setLogServer (const CInetAddress& logServerAddr)
|
|||
{
|
||||
_Server->connect (_ServerAddr);
|
||||
}
|
||||
catch( ESocket& )
|
||||
catch(const ESocket&)
|
||||
{
|
||||
// Silence
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ void CNetDisplayer::doDisplay ( const CLog::TDisplayInfo& args, const char *mess
|
|||
msg.serial( s );
|
||||
_Server->send (msg, 0, false);
|
||||
}
|
||||
catch( NLMISC::Exception& )
|
||||
catch(const NLMISC::Exception& )
|
||||
{
|
||||
// Silence
|
||||
}
|
||||
|
|
|
@ -914,7 +914,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
|
|||
// Get the localhost name
|
||||
localhost = CInetAddress::localHost().hostName();
|
||||
}
|
||||
catch (NLNET::ESocket &)
|
||||
catch (const NLNET::ESocket &)
|
||||
{
|
||||
localhost = "<UnknownHost>";
|
||||
}
|
||||
|
|
|
@ -419,7 +419,7 @@ void getNameOfMessageOrTransportClass( NLNET::CMessage& msgin, std::string& msgN
|
|||
msgin.seek( msgin.getHeaderSize(), NLMISC::IStream::begin );
|
||||
msgin.serial( msgName );
|
||||
}
|
||||
catch ( EStreamOverflow& )
|
||||
catch (const EStreamOverflow&)
|
||||
{
|
||||
msgName = "<Name not found>";
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ public:
|
|||
{
|
||||
f.serial(_Retrievers[i]);
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlwarning("Couldn't load retriever file '%s', %s", fname.c_str(), e.what());
|
||||
_Retrievers[i].clear();
|
||||
|
|
|
@ -883,7 +883,7 @@ void CAudioMixerUser::buildSampleBankList()
|
|||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
catch(const Exception &)
|
||||
{
|
||||
upToDate = false;
|
||||
}
|
||||
|
@ -2489,7 +2489,7 @@ void CAudioMixerUser::changeMaxTrack(uint maxTrack)
|
|||
_FreeTracks.insert(_FreeTracks.begin(), _Tracks[i]);
|
||||
}
|
||||
}
|
||||
catch ( ESoundDriver & )
|
||||
catch (const ESoundDriver &)
|
||||
{
|
||||
delete _Tracks[i];
|
||||
// If the source generation failed, keep only the generated number of sources
|
||||
|
|
|
@ -213,7 +213,7 @@ void CSampleBank::load(bool async)
|
|||
|
||||
_SampleBankManager->m_LoadedSize += _ByteSize;
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
// loading failed !
|
||||
nlwarning("Exception %s during loading of sample bank %s", e.what(), filename.c_str());
|
||||
|
|
|
@ -103,7 +103,7 @@ int main(int argc, char* argv[])
|
|||
animationOptimizer.addLowPrecisionTrack(anim_low_precision_tracks.asString(lpt));
|
||||
}
|
||||
}
|
||||
catch(EUnknownVar &)
|
||||
catch(const EUnknownVar &)
|
||||
{
|
||||
nlwarning("\"anim_low_precision_tracks\" not found in the parameter file. Add \"Finger\" and \"Ponytail\" by default");
|
||||
animationOptimizer.addLowPrecisionTrack("Finger");
|
||||
|
@ -126,7 +126,7 @@ int main(int argc, char* argv[])
|
|||
animationOptimizer.setSampleFrameRate(sr);
|
||||
}
|
||||
}
|
||||
catch(EUnknownVar &)
|
||||
catch(const EUnknownVar &)
|
||||
{
|
||||
nlwarning("\"anim_sample_rate\" not found in the parameter file. Use Default of 30 fps.");
|
||||
animationOptimizer.setSampleFrameRate(30);
|
||||
|
@ -198,7 +198,7 @@ int main(int argc, char* argv[])
|
|||
nlinfo("Anim skipped: %4d", numSkipped);
|
||||
|
||||
}
|
||||
catch (Exception& except)
|
||||
catch (const Exception& except)
|
||||
{
|
||||
// Error message
|
||||
nlwarning ("ERROR %s\n", except.what());
|
||||
|
|
|
@ -124,7 +124,7 @@ int main(int argc, char* argv[])
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
catch (Exception& e)
|
||||
catch (const Exception& e)
|
||||
{
|
||||
// Error message
|
||||
fprintf (stderr, "Error: %s\n", e.what());
|
||||
|
|
|
@ -173,7 +173,7 @@ int main(int argc, char *argv[])
|
|||
// NB: the key name here is the entire file, with the .anim, for easier georges editing.
|
||||
lodBuilder.addAnim(animFileName.c_str(), anim, bakeFrameRate);
|
||||
}
|
||||
catch(EPathNotFound &)
|
||||
catch(const EPathNotFound &)
|
||||
{
|
||||
printf("ERROR anim not found %s\n", animFileName.c_str());
|
||||
delete anim;
|
||||
|
@ -186,7 +186,7 @@ int main(int argc, char *argv[])
|
|||
uint32 shapeId= lodShapeBank.addShape();
|
||||
*lodShapeBank.getShapeFullAcces(shapeId)= lodBuilder.getLodShape();
|
||||
}
|
||||
catch(EUnknownVar &evar)
|
||||
catch(const EUnknownVar &evar)
|
||||
{
|
||||
nlwarning(evar.what());
|
||||
// Any other exception will make the program quit.
|
||||
|
@ -205,7 +205,7 @@ int main(int argc, char *argv[])
|
|||
oFile.serial(lodShapeBank);
|
||||
oFile.close();
|
||||
}
|
||||
catch (Exception& except)
|
||||
catch (const Exception& except)
|
||||
{
|
||||
// Error message
|
||||
printf ("ERROR %s.\n Aborting.\n", except.what());
|
||||
|
|
|
@ -100,7 +100,7 @@ bool computeOneShape(const char *lodFile, const char *shapeIn, const char *shape
|
|||
COFile dbgF("testDBG.tga");
|
||||
dbg.writeTGA(dbgF, 32);*/
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("ERROR: %s", e.what());
|
||||
return false;
|
||||
|
@ -179,7 +179,7 @@ int main(int argc, char *argv[])
|
|||
LodFilters[i]= var.asString(i*2+1);
|
||||
}
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
// It is not an error to have a bad config file: files will be copied
|
||||
nlwarning(e.what());
|
||||
|
|
|
@ -255,12 +255,12 @@ int main(int argc, char* argv[])
|
|||
nlwarning ("WARNING no coarse mesh to compute, abort.\n");
|
||||
}
|
||||
}
|
||||
catch (EConfigFile &e)
|
||||
catch (const EConfigFile &e)
|
||||
{
|
||||
// Something goes wrong... catch that
|
||||
nlwarning ("ERROR %s\n", e.what ());
|
||||
}
|
||||
catch (Exception &e)
|
||||
catch (const Exception &e)
|
||||
{
|
||||
// Something goes wrong... catch that
|
||||
nlwarning ("ERROR %s\n", e.what ());
|
||||
|
|
|
@ -267,7 +267,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
pBtmp->load(inFile);
|
||||
AllMaps[i] = pBtmp;
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
outString (string("ERROR :") + e.what());
|
||||
return -1;
|
||||
|
|
|
@ -125,7 +125,7 @@ int main(int argc, char *argv[])
|
|||
f.serial(textInfo);
|
||||
addTextToBank(textInfo, textBank);
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("ERROR: Unable to process %s. Reason: %s. Processing next", hlsInfofiles[k].c_str(), e.what());
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ int main(int argc, char *argv[])
|
|||
fOut.serial(textBank);
|
||||
fOut.close();
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("ERROR: Unable to write HLS Bank %s: %s", argv[2], e.what());
|
||||
exit(-1);
|
||||
|
|
|
@ -83,7 +83,7 @@ int main(int argc, char **argv)
|
|||
printf("TotalCells: %d\n", totalCells);
|
||||
|
||||
}
|
||||
catch (std::exception &e)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
printf("%s\n", e.what());
|
||||
}
|
||||
|
|
|
@ -365,7 +365,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
CMeshBase *pMB = dynamic_cast<CMeshBase*>(mesh.getShapePointer());
|
||||
AllShapes.push_back (pMB);
|
||||
}
|
||||
catch (NLMISC::EPathNotFound &e)
|
||||
catch (const NLMISC::EPathNotFound &e)
|
||||
{
|
||||
outString(string("ERROR: shape not found ")+AllShapeNames[nShp]+" - "+e.what());
|
||||
return -1;
|
||||
|
@ -529,7 +529,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
inFile.open(sTmp2);
|
||||
CBitmap::loadSize(inFile, wRef, hRef);
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
outString (string("ERROR :") + e.what());
|
||||
return -1;
|
||||
|
@ -546,7 +546,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
inFile.open(sTmp3);
|
||||
CBitmap::loadSize(inFile, wCur, hCur);
|
||||
}
|
||||
catch (NLMISC::Exception &)
|
||||
catch (const NLMISC::Exception &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -595,7 +595,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
pBtmp->load(inFile);
|
||||
AllLightmaps[i] = pBtmp;
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
outString (string("ERROR :") + e.what());
|
||||
return -1;
|
||||
|
@ -671,7 +671,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
BitmapJ.load (inFile);
|
||||
inFile.close ();
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
outString (string("ERROR :") + e.what());
|
||||
return -1;
|
||||
|
@ -883,7 +883,7 @@ int main(int nNbArg, char **ppArgs)
|
|||
meshfile.close ();
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EPathNotFound &e)
|
||||
catch (const NLMISC::EPathNotFound &e)
|
||||
{
|
||||
outString(string("ERROR: cannot save shape ")+AllShapeNames[k]+" - "+e.what());
|
||||
return -1;
|
||||
|
|
|
@ -140,7 +140,7 @@ int main(int argc, char* argv[])
|
|||
NLMISC::CPath::addSearchPath(NLMISC::CPath::standardizePath(additionnal_paths.asString(k)),true, false);
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
_Path_Input_TexBases = NLMISC::CPath::standardizePath(cf.getVar ("input_path_texbase").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
_Path_Input_Masks = NLMISC::CPath::standardizePath(cf.getVar ("input_path_mask").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
_Path_Output_MaksOptimized = NLMISC::CPath::standardizePath(cf.getVar ("output_path_mask_optimized").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
_Path_Output_Cgi = NLMISC::CPath::standardizePath(cf.getVar ("output_path_cgi").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -185,12 +185,12 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
_Path_Output_Gtm = NLMISC::CPath::standardizePath(cf.getVar ("output_path_gtm").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
catch (std::exception &e)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
nlwarning("Panoply building failed.");
|
||||
nlwarning(e.what());
|
||||
|
@ -256,7 +256,7 @@ int main(int argc, char* argv[])
|
|||
NLMISC::CPath::addSearchPath(NLMISC::CPath::standardizePath(additionnal_paths.asString(k)));
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -265,7 +265,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
bi.InputPath = NLMISC::CPath::standardizePath(cf.getVar ("input_path").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -274,7 +274,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
bi.OutputPath = NLMISC::CPath::standardizePath(cf.getVar ("output_path").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
bi.HlsInfoPath = NLMISC::CPath::standardizePath(cf.getVar("hls_info_path").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
bi.HlsInfoPath = "hlsInfo/";
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
bi.CachePath = NLMISC::CPath::standardizePath(cf.getVar ("cache_path").asString());
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
bi.OutputFormat = "." + cf.getVar ("output_format").asString();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
bi.OutputFormat = ".tga";
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
bi.DefaultSeparator = cf.getVar ("default_separator").asString();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
bi.DefaultSeparator = '_';
|
||||
}
|
||||
|
@ -330,7 +330,7 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
bi.BitmapExtensions[0].resize(1);
|
||||
bi.BitmapExtensions[0] = bi.OutputFormat;
|
||||
|
@ -340,14 +340,14 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
bi.LowDefShift = cf.getVar ("low_def_shift").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
// tranform 512*512 to 64*64 by default
|
||||
bi.LowDefShift= 3;
|
||||
}
|
||||
|
||||
}
|
||||
catch (std::exception &e)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
nlwarning("Panoply building failed.");
|
||||
nlwarning(e.what());
|
||||
|
@ -361,7 +361,7 @@ int main(int argc, char* argv[])
|
|||
{
|
||||
BuildColoredVersions(bi);
|
||||
}
|
||||
catch (std::exception &e)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
nlwarning("Something went wrong while building bitmap : %s", e.what());
|
||||
return -1;
|
||||
|
@ -389,7 +389,7 @@ static void validateCgiInfo()
|
|||
f.serialCont(temp);
|
||||
|
||||
}
|
||||
catch(std::exception &e)
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
nlwarning("Panoply building failed.");
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ static void BuildColoredVersions(const CBuildInfo &bi)
|
|||
//nlwarning(("No need to rebuild " + NLMISC::CFile::getFilename(files[k])).c_str());
|
||||
}
|
||||
}
|
||||
catch (std::exception &e)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
nlwarning("Processing of %s failed : %s \n", files[k].c_str(), e.what());
|
||||
}
|
||||
|
@ -662,7 +662,7 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str
|
|||
return;
|
||||
}
|
||||
}
|
||||
catch (NLMISC::Exception &)
|
||||
catch (const NLMISC::Exception &)
|
||||
{
|
||||
nlwarning("File or format error with : %s. Processing next...", fileNameWithExtension.c_str());
|
||||
return;
|
||||
|
@ -743,7 +743,7 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str
|
|||
return;
|
||||
}
|
||||
}
|
||||
catch (std::exception &e)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
nlwarning("Error with : %s : %s. Aborting this bitmap processing", maskFileName.c_str(), e.what());
|
||||
return;
|
||||
|
@ -827,7 +827,7 @@ static void BuildColoredVersionForOneBitmap(const CBuildInfo &bi, const std::str
|
|||
nlwarning(("Couldn't open " + bi.OutputPath + outputFileName + bi.OutputFormat + " for writing").c_str());
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlwarning(("Couldn't write " + bi.OutputPath + outputFileName + bi.OutputFormat + " : " + e.what()).c_str());
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
// load the config file
|
||||
cf.load(filename);
|
||||
}
|
||||
catch(exception &e)
|
||||
catch(const exception &e)
|
||||
{
|
||||
nlwarning("can't parse config file : %s", filename.c_str());
|
||||
nlwarning(e.what());
|
||||
|
@ -129,7 +129,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.output_format = cf.getVar("output_format").asString();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.output_format = "jpg";
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
for (uint i=0; i < (uint)search_pathes.size(); ++i)
|
||||
CPath::addSearchPath(CPath::standardizePath(search_pathes.asString(i)));
|
||||
}
|
||||
catch(EUnknownVar &)
|
||||
catch(const EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
for (uint i=0; i< (uint)recursive_search_pathes.size(); ++i)
|
||||
CPath::addSearchPath(CPath::standardizePath(recursive_search_pathes.asString(i)), true, false);
|
||||
}
|
||||
catch(EUnknownVar &)
|
||||
catch(const EUnknownVar &)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.preview_format = cf.getVar("preview_format").asString();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.preview_format = "jpg";
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.preview_width = cf.getVar("preview_width").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.preview_width = 256;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.preview_height = cf.getVar("preview_height").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.preview_height = 256;
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.preview_quality = (uint8)cf.getVar("preview_quality").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.preview_quality = 90;
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.output_steps_z = cf.getVar("output_steps_z").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.output_steps_z = 10;
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.output_steps_x = cf.getVar("output_steps_x").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.output_steps_x = 10;
|
||||
}
|
||||
|
@ -303,7 +303,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.output_width = cf.getVar("output_width").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.output_width = 256;
|
||||
}
|
||||
|
@ -313,7 +313,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.output_height = cf.getVar("output_height").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.output_height = 256;
|
||||
}
|
||||
|
@ -323,7 +323,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.output_antialiasing = (uint8)cf.getVar("output_antialiasing").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.output_antialiasing = 2;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
|
|||
{
|
||||
settings.output_quality = (uint8)cf.getVar("output_quality").asInt();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
settings.output_quality = 90;
|
||||
}
|
||||
|
|
|
@ -629,7 +629,7 @@ int main(int argc, char **argv)
|
|||
picSrc.writePNG (output, 8);
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EWriteError &e)
|
||||
catch(const NLMISC::EWriteError &e)
|
||||
{
|
||||
cerr<<e.what()<<endl;
|
||||
return 1;
|
||||
|
@ -675,7 +675,7 @@ int main(int argc, char **argv)
|
|||
CS3TCCompressor comp;
|
||||
comp.compress(picSrc, OptMipMap, algo, output);
|
||||
}
|
||||
catch(NLMISC::EWriteError &e)
|
||||
catch(const NLMISC::EWriteError &e)
|
||||
{
|
||||
cerr<<e.what()<<endl;
|
||||
return 1;
|
||||
|
|
|
@ -289,7 +289,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
picSrc.writeTGA (output, 16);
|
||||
}
|
||||
catch(NLMISC::EWriteError &e)
|
||||
catch(const NLMISC::EWriteError &e)
|
||||
{
|
||||
cerr<<e.what()<<endl;
|
||||
exit(1);
|
||||
|
|
|
@ -196,7 +196,7 @@ static uint CheckZone(std::string middleZoneFile, float weldThreshold, float mid
|
|||
zones[k].reset(::LoadZone(xPos + posOffs[k][0], yPos + posOffs[k][1], ext.empty() ? "" : "." + ext));
|
||||
}
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlinfo("Zones loading failed : %d", e.what());
|
||||
return 0;
|
||||
|
|
|
@ -654,7 +654,7 @@ static void computeIGBBox(const NL3D::CInstanceGroup &ig, CLightingBBox &result,
|
|||
validBBox = true;
|
||||
}
|
||||
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlwarning("Error while loading shape %s. \n\t Reason : %s ", it->Name.c_str(), e.what());
|
||||
}
|
||||
|
@ -734,7 +734,7 @@ static void computeZoneIGBBox(const char *zoneName, CLightingBBox &result, TShap
|
|||
{
|
||||
ig.serial(igFile);
|
||||
}
|
||||
catch (NLMISC::Exception &e)
|
||||
catch (const NLMISC::Exception &e)
|
||||
{
|
||||
nlwarning("Error while reading an instance group file : %s \n reason : %s", pathName.c_str(), e.what());
|
||||
return;
|
||||
|
@ -803,7 +803,7 @@ static void computeBBoxFromVillage(const NLGEORGES::UFormElm *villageItem,
|
|||
computeIGBBox(group, currBBox, shapeMap);
|
||||
result.makeUnion(currBBox);
|
||||
}
|
||||
catch(NLMISC::Exception &)
|
||||
catch(const NLMISC::Exception &)
|
||||
{
|
||||
nlwarning ("Error while loading instance group %s\n", igName.c_str());
|
||||
continue;
|
||||
|
@ -909,7 +909,7 @@ static void computeIGBBoxFromContinent(NLMISC::CConfigFile ¶meter,
|
|||
nlwarning("Can't load continent form : %s", continentName.c_str());
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &e)
|
||||
catch (const NLMISC::EUnknownVar &e)
|
||||
{
|
||||
nlinfo(e.what());
|
||||
}
|
||||
|
|
|
@ -305,7 +305,7 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
nlinfo("No additionnal ig's to load");
|
||||
}
|
||||
|
|
|
@ -158,7 +158,7 @@ static void loadIGFromVillage(const NLGEORGES::UFormElm *villageItem, const std:
|
|||
{
|
||||
group->serial (inputFile);
|
||||
}
|
||||
catch(NLMISC::Exception &)
|
||||
catch(const NLMISC::Exception &)
|
||||
{
|
||||
nlwarning ("Error while loading instance group %s\n", igName.c_str());
|
||||
continue;
|
||||
|
@ -266,7 +266,7 @@ static void loadIGFromContinent(NLMISC::CConfigFile ¶meter, std::list<CInsta
|
|||
nlwarning("Can't load continent form : %s", continentName.c_str());
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &e)
|
||||
catch (const NLMISC::EUnknownVar &e)
|
||||
{
|
||||
nlinfo(e.what());
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
nlinfo("No additionnal ig's to load");
|
||||
}
|
||||
|
|
|
@ -270,7 +270,7 @@ void weldZones(const char *center)
|
|||
adjZonesName[i]="empty";
|
||||
}
|
||||
}
|
||||
catch(exception &e)
|
||||
catch(const exception &e)
|
||||
{
|
||||
nlwarning ("ERROR %s\n", e.what ());
|
||||
adjZoneFileFound[i] = false;
|
||||
|
|
|
@ -364,7 +364,7 @@ void displayZones()
|
|||
CIFile bankFile (ViewerCfg.BanksPath + "/" + ViewerCfg.Bank);
|
||||
Landscape->Landscape.TileBank.serial(bankFile);
|
||||
}
|
||||
catch(Exception)
|
||||
catch(const Exception &)
|
||||
{
|
||||
string tmp = string("Cant load bankfile ")+ViewerCfg.BanksPath + "/" + ViewerCfg.Bank;
|
||||
nlerror (tmp.c_str());
|
||||
|
@ -390,7 +390,7 @@ void displayZones()
|
|||
CIFile farbankFile(ViewerCfg.BanksPath + "/" + farBank);
|
||||
Landscape->Landscape.TileFarBank.serial(farbankFile);
|
||||
}
|
||||
catch(Exception)
|
||||
catch(const Exception &)
|
||||
{
|
||||
string tmp = string("Cant load bankfile ")+ViewerCfg.BanksPath + "/" + farBank;
|
||||
nlerror (tmp.c_str());
|
||||
|
@ -450,7 +450,7 @@ void displayZones()
|
|||
// Add it to collision manager.
|
||||
CollisionManager.addZone(zone.getZoneId());
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
printf("%s\n", e.what ());
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ void displayZones()
|
|||
// Add it to the scene.
|
||||
group->addToScene (*CNELU::Scene);
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
printf("%s\n", e.what ());
|
||||
}
|
||||
|
|
|
@ -838,7 +838,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType
|
|||
ForceInsertParents = (fiparents->asInt() == 1);
|
||||
nlinfo( "Force insert parents mode: %s", ForceInsertParents ? "ON" : "OFF" );
|
||||
}
|
||||
catch ( EConfigFile& e )
|
||||
catch (const EConfigFile &e)
|
||||
{
|
||||
nlwarning( "Problem in directory mapping: %s", e.what() );
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ void processAllPasses(string &zoneName)
|
|||
retriever.serial(outputRetriever);
|
||||
}
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
printf("%s\n", e.what ());
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ void tessellateAndMoulineZone(string &zoneName)
|
|||
outputChains.serialCont(fullChains);
|
||||
}
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
printf(e.what ());
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ void processRetriever(string &zoneName)
|
|||
retriever.serial(outputRetriever);
|
||||
}
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
printf(e.what ());
|
||||
}
|
||||
|
|
|
@ -336,21 +336,21 @@ void CBGDownloaderAccess::CDownloadCoTask::run()
|
|||
}
|
||||
}
|
||||
}
|
||||
catch(EDownloadException &e)
|
||||
catch(const EDownloadException &e)
|
||||
{
|
||||
//shutdownDownloader();
|
||||
Parent->_TaskResult = TaskResult_Error;
|
||||
Parent->_ErrorMsg.fromUtf8(e.what());
|
||||
Parent->_DownloadThreadPriority = ThreadPriority_DownloaderError;
|
||||
}
|
||||
catch(EDownloadTerminationRequested &e)
|
||||
catch(const EDownloadTerminationRequested &e)
|
||||
{
|
||||
shutdownDownloader();
|
||||
Parent->_TaskResult = TaskResult_Error;
|
||||
Parent->_ErrorMsg = ucstring(e.what());
|
||||
Parent->_DownloadThreadPriority = ThreadPriority_DownloaderError;
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
shutdownDownloader();
|
||||
Parent->_TaskResult = TaskResult_Error;
|
||||
|
@ -358,7 +358,7 @@ void CBGDownloaderAccess::CDownloadCoTask::run()
|
|||
Parent->_ErrorMsg = CI18N::get("uiBGD_ProtocolError") + ucstring(" : ") + ucstring(e.what());
|
||||
Parent->_DownloadThreadPriority = ThreadPriority_DownloaderError;
|
||||
}
|
||||
catch (EWaitMessageTimeoutException &e)
|
||||
catch (const EWaitMessageTimeoutException &e)
|
||||
{
|
||||
shutdownDownloader();
|
||||
Parent->_TaskResult = TaskResult_Error;
|
||||
|
|
|
@ -239,7 +239,7 @@ class CAHSaveCameraRecord : public IActionHandler
|
|||
nlwarning("Couldn't compute camera recorder next filename");
|
||||
}
|
||||
}
|
||||
catch(EStream &e)
|
||||
catch(const EStream &e)
|
||||
{
|
||||
nlwarning(e.what());
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ NLMISC_COMMAND(loadCamRec, "Load a camera path record file (.cr)", "<filename>")
|
|||
f.serialCont(Track);
|
||||
State = Idle;
|
||||
}
|
||||
catch(EStream &e)
|
||||
catch(const EStream &e)
|
||||
{
|
||||
nlwarning(e.what());
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ using namespace NLNET;
|
|||
// We don't catch(...) because these exception are already trapped with the se_translation that generate the NeL message box
|
||||
|
||||
#define RYZOM_TRY(_block) try { nlinfo(_block" of Ryzom...");
|
||||
#define RYZOM_CATCH(_block) nlinfo(_block" of Ryzom success"); } catch(EFatalError &) { return EXIT_FAILURE; }
|
||||
#define RYZOM_CATCH(_block) nlinfo(_block" of Ryzom success"); } catch(const EFatalError &) { return EXIT_FAILURE; }
|
||||
|
||||
/////////////
|
||||
// GLOBALS //
|
||||
|
@ -168,7 +168,7 @@ static bool connect()
|
|||
goto end;
|
||||
}
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("Can't connect to web server '%s': %s", server.c_str(), e.what());
|
||||
goto end;
|
||||
|
|
|
@ -323,7 +323,7 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st
|
|||
{
|
||||
mask_extensions = &cf.getVar("mask_extensions");
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st
|
|||
_Slots[k + startSlot][l] = extensions.asString(l);
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
_Slots.resize(startSlot);
|
||||
nlwarning(("CColorSlotManager::addSlotsFromConfigFile : invalid config file, variable not found :" + mask_extensions->asString(k) + "_color_id").c_str());
|
||||
|
@ -355,7 +355,7 @@ bool CColorSlotManager::addSlotsFromConfigFile(NLMISC::CConfigFile &cf, uint &st
|
|||
{
|
||||
_Separator = cf.getVar("default_separator").asString();
|
||||
}
|
||||
catch (NLMISC::EUnknownVar &)
|
||||
catch (const NLMISC::EUnknownVar &)
|
||||
{
|
||||
_Separator = "_";
|
||||
}
|
||||
|
|
|
@ -5137,7 +5137,7 @@ NLMISC_COMMAND(luaObject, "Dump the content of a lua object", "<table name> [max
|
|||
// make a reference to the table to be inspected (is this this a primitive type, just make a copy)
|
||||
luaState->executeScript(std::string(inspectedTable) + " = " + args[0]);
|
||||
}
|
||||
catch(ELuaError &e)
|
||||
catch(const ELuaError &e)
|
||||
{
|
||||
CLuaIHM::debugInfo(e.what());
|
||||
return false;
|
||||
|
@ -5407,7 +5407,7 @@ NLMISC_COMMAND(dumpPosAsPrim, "ld helper : add current position to pos.primitive
|
|||
stream.open(path);
|
||||
stream.serialBuffer((uint8 *) &srcFile[0], fileSize);
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlinfo(e.what());
|
||||
srcFile.clear();
|
||||
|
@ -5455,7 +5455,7 @@ NLMISC_COMMAND(dumpPosAsPrim, "ld helper : add current position to pos.primitive
|
|||
stream.open(path);
|
||||
stream.serialBuffer((uint8 *) &srcFile[0], (uint)srcFile.size());
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlinfo(e.what());
|
||||
}
|
||||
|
|
|
@ -1011,7 +1011,7 @@ TInterfaceState globalMenu()
|
|||
if ( ! firewallTimeout )
|
||||
NetMngr.update();
|
||||
}
|
||||
catch ( EBlockedByFirewall& )
|
||||
catch (const EBlockedByFirewall&)
|
||||
{
|
||||
if ( NetMngr.getConnectionState() == CNetManager::Disconnect )
|
||||
{
|
||||
|
|
|
@ -1266,7 +1266,7 @@ void CContinent::dumpVillagesLoadingZones(const std::string &filename)
|
|||
{
|
||||
outBitmap.writeTGA(outFile, 24, true);
|
||||
}
|
||||
catch(EStream &)
|
||||
catch(const EStream &)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -1327,7 +1327,7 @@ void CContinent::dumpFogMap(CFogMapBuild::TMapType mapType, const std::string &f
|
|||
{
|
||||
outBitmap.writeTGA(outFile, 24);
|
||||
}
|
||||
catch(EStream &)
|
||||
catch(const EStream &)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@ const std::string& CLoginStateMachine::toString(CLoginStateMachine::TEvent event
|
|||
outputF.close(); \
|
||||
} \
|
||||
} \
|
||||
catch ( Exception & ) \
|
||||
catch (const Exception &) \
|
||||
{} \
|
||||
_CurrentState = stateId; \
|
||||
break; \
|
||||
|
@ -912,7 +912,7 @@ retryJoinEdit:
|
|||
outputF.close();
|
||||
}
|
||||
}
|
||||
catch ( Exception & )
|
||||
catch (const Exception &)
|
||||
{}
|
||||
|
||||
// If the session is not a permanent session and has vanished, pop the position
|
||||
|
|
|
@ -224,7 +224,7 @@ void CFogMap::load(NLMISC::CBitmap &bm, const std::string &filename)
|
|||
inputFile.close();
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlwarning(e.what());
|
||||
inputFile.close();
|
||||
|
|
|
@ -57,7 +57,7 @@ bool CHttpClient::connect(std::string server)
|
|||
nldebug("Connected to web server '%s'", server.c_str());
|
||||
}
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("Can't connect to web server '%s': %s", server.c_str(), e.what());
|
||||
goto end;
|
||||
|
|
|
@ -1264,7 +1264,7 @@ void postlogInit()
|
|||
{
|
||||
SoundMngr->init(&ProgressBar);
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("init : Error when creating 'SoundMngr' : %s", e.what());
|
||||
// leak the alocated sound manager...
|
||||
|
|
|
@ -865,7 +865,7 @@ void initMainLoop()
|
|||
// load hlsBank
|
||||
Driver->loadHLSBank("characters.hlsbank");
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("Can't load HLSBank: %s", e.what());
|
||||
}
|
||||
|
|
|
@ -775,7 +775,7 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
|
|||
_Islands.push_back(island);
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EFile &e)
|
||||
catch(const NLMISC::EFile &e)
|
||||
{
|
||||
nlwarning(e.what());
|
||||
}
|
||||
|
|
|
@ -1235,7 +1235,7 @@ CInterfaceElement *CInterfaceElement::clone()
|
|||
dupStream.fill(&datas[0], (uint32)datas.size());
|
||||
dupStream.serialPolyPtr(begunThisCloneWarHas);
|
||||
}
|
||||
catch(NLMISC::EStream &)
|
||||
catch(const NLMISC::EStream &)
|
||||
{
|
||||
// no-op -> caller has to handle the failure because NULL will be returned
|
||||
}
|
||||
|
|
|
@ -1659,7 +1659,7 @@ bool CInterfaceManager::loadConfig (const string &filename)
|
|||
}
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EStream &)
|
||||
catch(const NLMISC::EStream &)
|
||||
{
|
||||
f.close();
|
||||
string sFileNameBackup = sFileName+"backup";
|
||||
|
@ -1846,7 +1846,7 @@ bool CInterfaceManager::saveConfig (const string &filename)
|
|||
return false;
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EStream &)
|
||||
catch(const NLMISC::EStream &)
|
||||
{
|
||||
f.close();
|
||||
nlwarning("Config saving failed.");
|
||||
|
@ -5754,7 +5754,7 @@ bool CInterfaceManager::executeLuaScript(const std::string &luaScript, bool smal
|
|||
else
|
||||
_LuaState->executeScript(luaScript);
|
||||
}
|
||||
catch(ELuaError &e)
|
||||
catch(const ELuaError &e)
|
||||
{
|
||||
std::string msg = e.luaWhat();
|
||||
char filename[MAX_PATH];
|
||||
|
|
|
@ -4721,7 +4721,7 @@ bool CInterfaceParser::loadLUA(const std::string &fileName, std::string &error)
|
|||
{
|
||||
_LuaState->executeFile(pathName);
|
||||
}
|
||||
catch(ELuaError &e)
|
||||
catch(const ELuaError &e)
|
||||
{
|
||||
nlwarning(e.luaWhat().c_str());
|
||||
error= e.luaWhat();
|
||||
|
|
|
@ -613,7 +613,7 @@ void CLuaObject::dump(uint maxDepth /*= 20*/, std::set<const void *> *alreadySee
|
|||
NLMISC::InfoLog->forceDisplayRaw((res[k] + "\n") .c_str());
|
||||
}
|
||||
}
|
||||
catch(std::exception &e)
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
CLuaIHM::dumpCallStack();
|
||||
nlwarning(e.what());
|
||||
|
|
|
@ -1670,7 +1670,7 @@ bool CPeopleInterraction::saveUserChatsInfos(NLMISC::IStream &f)
|
|||
pCGW->saveFreeTeller(f);
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlwarning("Error while saving user chat infos : %s", e.what());
|
||||
return false;
|
||||
|
@ -1691,7 +1691,7 @@ bool CPeopleInterraction::saveUserDynChatsInfos(NLMISC::IStream &f)
|
|||
saveFilteredDynChat(f, TheUserChat);
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlwarning("Error while saving user dyn chat infos : %s", e.what());
|
||||
return false;
|
||||
|
@ -1756,7 +1756,7 @@ bool CPeopleInterraction::loadUserChatsInfos(NLMISC::IStream &f)
|
|||
if (pCGW) pCGW->loadFreeTeller(f);
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlwarning("Error while loading user chat infos : %s", e.what());
|
||||
return false;
|
||||
|
@ -1786,7 +1786,7 @@ bool CPeopleInterraction::loadUserDynChatsInfos(NLMISC::IStream &f)
|
|||
setupUserDynChatFromSummary(fcs, TheUserChat);
|
||||
}
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlwarning("Error while loading user dyn chat infos : %s", e.what());
|
||||
return false;
|
||||
|
|
|
@ -59,7 +59,7 @@ void CYuboChat::connect(const string &url, const std::string &login, const std::
|
|||
return;
|
||||
}
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
addStringReceived(toString("ERROR: exception with server %s: %s", _URL.c_str(), e.what()));
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void CYuboChat::disconnect()
|
|||
{
|
||||
_Sock.disconnect();
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
addStringReceived(toString("ERROR: exception with server %s: %s", _URL.c_str(), e.what()));
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ void CYuboChat::sendInternal(const ucstring &msg)
|
|||
size= (uint32)toSend.size()-off;
|
||||
}
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
addStringReceived(toString("ERROR: exception with server %s: %s", _URL.c_str(), e.what()));
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ bool CLodCharacterUserManager::addLodShapeBank(const std::string &filename)
|
|||
// load and add the file to the main scene
|
||||
Scene->loadCLodShapeBank(filename);
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning(e.what());
|
||||
return false;
|
||||
|
|
|
@ -1721,15 +1721,15 @@ class CAHReboot : public IActionHandler
|
|||
}
|
||||
LoginSM.pushEvent(CLoginStateMachine::ev_reboot);
|
||||
}
|
||||
catch (NLMISC::EDiskFullError &)
|
||||
catch (const NLMISC::EDiskFullError &)
|
||||
{
|
||||
im->messageBoxWithHelp(CI18N::get("uiPatchDiskFull"), "ui:login");
|
||||
}
|
||||
catch (NLMISC::EWriteError &)
|
||||
catch (const NLMISC::EWriteError &)
|
||||
{
|
||||
im->messageBoxWithHelp(CI18N::get("uiPatchWriteError"), "ui:login");
|
||||
}
|
||||
catch (std::exception &e)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
im->messageBoxWithHelp(ucstring(e.what()), "ui:login", "login_quit");
|
||||
}
|
||||
|
|
|
@ -386,7 +386,7 @@ void CPatchManager::readClientVersionAndDescFile()
|
|||
DescFilename = "unknown";
|
||||
ValidDescFile = true;
|
||||
}
|
||||
catch(Exception &)
|
||||
catch(const Exception &)
|
||||
{
|
||||
nlwarning("EXCEPTION CATCH: readClientVersionAndDescFile() failed - not important");
|
||||
// Not important that there is no desc file
|
||||
|
@ -2492,7 +2492,7 @@ void CCheckThread::run ()
|
|||
CheckOk = true;
|
||||
Ended = true;
|
||||
}
|
||||
catch (NLMISC::EDiskFullError)
|
||||
catch (const NLMISC::EDiskFullError &)
|
||||
{
|
||||
// more explicit message for this common error case
|
||||
nlwarning("EXCEPTION CATCH: disk full");
|
||||
|
@ -2622,7 +2622,7 @@ void CPatchThread::run()
|
|||
}
|
||||
|
||||
}
|
||||
catch (NLMISC::EDiskFullError)
|
||||
catch (const NLMISC::EDiskFullError &)
|
||||
{
|
||||
// more explicit message for this common error case
|
||||
nlwarning("EXCEPTION CATCH: CPatchThread::run() Disk Full");
|
||||
|
@ -2630,7 +2630,7 @@ void CPatchThread::run()
|
|||
sTranslate = CI18N::get("uiPatchDiskFull");
|
||||
bErr = true;
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("EXCEPTION CATCH: CPatchThread::run() failed");
|
||||
pPM->setState(true, ucstring(e.what()));
|
||||
|
@ -2803,7 +2803,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP)
|
|||
// else -> file comes from a previous download (with .tmp extension, and is up to date)
|
||||
// the remaining code will just rename it with good name and exit
|
||||
}
|
||||
catch (NLMISC::EWriteError)
|
||||
catch (const NLMISC::EWriteError &)
|
||||
{
|
||||
// this is a local error, rethrow ...
|
||||
throw;
|
||||
|
@ -2814,7 +2814,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP)
|
|||
pPM->getServerFile(lzmaFile, false, "", &progress);
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EWriteError)
|
||||
catch (const NLMISC::EWriteError &)
|
||||
{
|
||||
// this is a local error, rethrow ...
|
||||
throw;
|
||||
|
@ -2837,7 +2837,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP)
|
|||
break;
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EWriteError)
|
||||
catch (const NLMISC::EWriteError&)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
@ -2880,7 +2880,7 @@ void CPatchThread::processFile (CPatchManager::SFileToPatch &rFTP)
|
|||
// remove the subfolder name
|
||||
PatchName = NLMISC::CFile::getFilename(PatchName);
|
||||
}
|
||||
catch (NLMISC::EWriteError)
|
||||
catch (const NLMISC::EWriteError &)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ public:
|
|||
if (StopWanted) break;
|
||||
}
|
||||
}
|
||||
catch (std::exception &e)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
nlwarning(e.what());
|
||||
}
|
||||
|
|
|
@ -850,7 +850,7 @@ void updateFromClientCfg()
|
|||
{
|
||||
SoundMngr->init(NULL);
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("init : Error when creating 'SoundMngr' : %s", e.what());
|
||||
SoundMngr = 0;
|
||||
|
|
|
@ -141,7 +141,7 @@ void initReceiveLog()
|
|||
ReceiveLogger.displayNL( "LogReceive is on" ); // only when enabled
|
||||
}
|
||||
}
|
||||
catch ( EConfigFile& )
|
||||
catch (const EConfigFile&)
|
||||
{}
|
||||
}
|
||||
|
||||
|
@ -968,7 +968,7 @@ void CNetworkConnection::sendSystemLogin()
|
|||
//sendUDP (&(_Connection), message.buffer(), length);
|
||||
_Connection.send( message.buffer(), length );
|
||||
}
|
||||
catch ( ESocket& e )
|
||||
catch (const ESocket &e)
|
||||
{
|
||||
#ifdef NL_OS_WINDOWS
|
||||
// An exception (10004: Blocking operation interrupted) may occur if a firewall such as Kerio is
|
||||
|
@ -1123,7 +1123,7 @@ void CNetworkConnection::receiveSystemSync(CBitMemStream &msgin)
|
|||
if(xmlInvalid)
|
||||
xmlInvalid = (checkMsgXml != _AltMsgXmlMD5 || checkDatabaseXml != _AltDatabaseXmlMD5);
|
||||
}
|
||||
catch (NLMISC::Exception&)
|
||||
catch (const NLMISC::Exception&)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -1720,7 +1720,7 @@ void CNetworkConnection::decodeVisualProperties( CBitMemStream& msgin )
|
|||
}
|
||||
}
|
||||
}
|
||||
catch ( EStreamOverflow& )
|
||||
catch (const EStreamOverflow&)
|
||||
{
|
||||
// End of stream (saves useless bits)
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ void initPrimitiveBlocks()
|
|||
{
|
||||
addPacsPrim(primFile);
|
||||
}
|
||||
catch (NLMISC::Exception &)
|
||||
catch (const NLMISC::Exception &)
|
||||
{
|
||||
nlwarning("Error while loading %s", primFile.c_str());
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ static void setPermanentBanFileMarker(const std::string &path, bool on)
|
|||
SetFileAttributes(path.c_str(), FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM);
|
||||
#endif
|
||||
}
|
||||
catch(EStream &e)
|
||||
catch(const EStream &e)
|
||||
{
|
||||
nlinfo(e.what());
|
||||
}
|
||||
|
|
|
@ -1359,7 +1359,7 @@ CObject* CComLuaModule::loadFromBuffer(const std::string& data, const std::strin
|
|||
}
|
||||
}
|
||||
}
|
||||
catch(ELuaError &e)
|
||||
catch(const ELuaError &e)
|
||||
{
|
||||
nlwarning("%s", e.what());
|
||||
}
|
||||
|
|
|
@ -1706,7 +1706,7 @@ void CEditor::waitScenarioScreen()
|
|||
if ( ! firewallTimeout )
|
||||
NetMngr.update();
|
||||
}
|
||||
catch ( EBlockedByFirewall& )
|
||||
catch (const EBlockedByFirewall&)
|
||||
{
|
||||
if ( NetMngr.getConnectionState() == CNetManager::Disconnect )
|
||||
{
|
||||
|
@ -4414,11 +4414,11 @@ bool CEditor::doLuaScript(const char *filename, const char *fileDescText)
|
|||
CLuaStackChecker ls(&getLua());
|
||||
return true;
|
||||
}
|
||||
catch(NLMISC::EStream &e)
|
||||
catch(const NLMISC::EStream &e)
|
||||
{
|
||||
nlwarning("Error while loading R2 %s (file = %s) : %s", fileDescText, filename, e.what());
|
||||
}
|
||||
catch(ELuaError &e)
|
||||
catch(const ELuaError &e)
|
||||
{
|
||||
//char filename[MAX_PATH];
|
||||
std::string msg = e.what();
|
||||
|
|
|
@ -432,7 +432,7 @@ CPackedWorld *CIslandCollision::reloadPackedIsland(const CScenarioEntryPoints::C
|
|||
f.serialCheck((uint32) 'MHSI');
|
||||
f.serial(_HeightMap);
|
||||
}
|
||||
catch(Exception &e)
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning(e.what());
|
||||
_HeightMap.clear();
|
||||
|
@ -572,7 +572,7 @@ void CIslandCollision::loadEntryPoints()
|
|||
{
|
||||
sep.loadCompleteIslands();
|
||||
}
|
||||
catch (NLMISC::EStream &e)
|
||||
catch (const NLMISC::EStream &e)
|
||||
{
|
||||
_EntryPointsLoadingFailure = true;
|
||||
nlwarning(e.what());
|
||||
|
|
|
@ -369,7 +369,7 @@ void CToolSelectMove::commitAction(CInstance &instance)
|
|||
pos.setValue("y", _FinalPos.y);
|
||||
pos.setValue("z", _FinalPos.z);
|
||||
}
|
||||
catch(ELuaNotATable &)
|
||||
catch(const ELuaNotATable &)
|
||||
{
|
||||
nlwarning("Error while setting position of copied object");
|
||||
}
|
||||
|
|
|
@ -427,7 +427,7 @@ void CSessionBrowserImpl::fill(const std::vector <RSMGR::TSessionDesc > &session
|
|||
// call into lua
|
||||
callRingAccessPointMethod("onSessionListReceived", 1, 0);
|
||||
}
|
||||
catch(ELuaError &)
|
||||
catch(const ELuaError &)
|
||||
{
|
||||
// no-op (error msg already printed at exception launch)
|
||||
}
|
||||
|
@ -454,7 +454,7 @@ void CSessionBrowserImpl::playerRatingFill(bool scenarioRated, uint32 rateFun, u
|
|||
// call into lua
|
||||
callScenarioScoresMethod("onScenarioScoresReceived", 1, 0);
|
||||
}
|
||||
catch(ELuaError &)
|
||||
catch(const ELuaError &)
|
||||
{
|
||||
// no-op (error msg already printed at exception launch)
|
||||
}
|
||||
|
@ -482,7 +482,7 @@ void CSessionBrowserImpl::averageScoresFill(bool scenarioRated, uint32 rateFun,
|
|||
// call into lua
|
||||
callScenarioScoresMethod("onAverageScoresReceived", 1, 0);
|
||||
}
|
||||
catch(ELuaError &)
|
||||
catch(const ELuaError &)
|
||||
{
|
||||
// no-op (error msg already printed at exception launch)
|
||||
}
|
||||
|
@ -573,7 +573,7 @@ void CSessionBrowserImpl::on_scenarioAverageScores(NLNET::TSockId /* from */, bo
|
|||
// call into lua
|
||||
callScenarioScoresMethod("onScenarioAverageScoresReceived", 1, 0);
|
||||
}
|
||||
catch(ELuaError &)
|
||||
catch(const ELuaError &)
|
||||
{
|
||||
// no-op (error msg already printed at exception launch)
|
||||
}
|
||||
|
@ -647,7 +647,7 @@ void CSessionBrowserImpl::charsFill(const std::vector <RSMGR::TCharDesc > &chars
|
|||
// call into lua
|
||||
callRingCharTrackingMethod("onCharsListReceived", 1, 0);
|
||||
}
|
||||
catch(ELuaError &)
|
||||
catch(const ELuaError &)
|
||||
{
|
||||
// no-op (error msg already printed at exception launch)
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ void CSessionBrowserImpl::ringStatsFill()
|
|||
pSM->tryToUnblockTitleFromRingRatings( _LastAuthorRating, _LastAMRating, _LastMasterlessRating );
|
||||
}
|
||||
}
|
||||
catch(ELuaError &)
|
||||
catch(const ELuaError &)
|
||||
{
|
||||
// no-op (error msg already printed at exception launch)
|
||||
}
|
||||
|
|
|
@ -305,7 +305,7 @@ CBitmap *buildSharedBitmap(const std::string &filename,
|
|||
// dump bitmap fisrt line
|
||||
return builtBitmaps.back();
|
||||
}
|
||||
catch(EStream &)
|
||||
catch(const EStream &)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -512,7 +512,7 @@ void CSoundManager::init(IProgressCallback *progressCallBack)
|
|||
_AudioMixer->enableBackgroundMusicTimeConstraint(ClientCfg.EnableBackgroundMusicTimeConstraint);
|
||||
|
||||
/* }
|
||||
catch( Exception& e )
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning( "Error: %s", e.what() );
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace STRING_MANAGER
|
|||
|
||||
_CacheLoaded = true;
|
||||
}
|
||||
catch(NLMISC::Exception &e)
|
||||
catch(const NLMISC::Exception &e)
|
||||
{
|
||||
nlinfo("SM : loadCache failed, exception : %s", e.what());
|
||||
nlinfo("SM : cache deactivated");
|
||||
|
@ -620,7 +620,7 @@ restartLoop:
|
|||
{
|
||||
dynInfo.Message.serial(param.StringId);
|
||||
}
|
||||
catch(Exception &)
|
||||
catch(const Exception &)
|
||||
{
|
||||
param.StringId = EmptyStringId;
|
||||
}
|
||||
|
@ -631,7 +631,7 @@ restartLoop:
|
|||
{
|
||||
dynInfo.Message.serial(param.Integer);
|
||||
}
|
||||
catch(Exception &)
|
||||
catch(const Exception &)
|
||||
{
|
||||
param.Integer= 0;
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ restartLoop:
|
|||
{
|
||||
dynInfo.Message.serial(param.Time);
|
||||
}
|
||||
catch(Exception &)
|
||||
catch(const Exception &)
|
||||
{
|
||||
param.Time= 0;
|
||||
}
|
||||
|
@ -653,7 +653,7 @@ restartLoop:
|
|||
{
|
||||
dynInfo.Message.serial(param.Money);
|
||||
}
|
||||
catch(Exception &)
|
||||
catch(const Exception &)
|
||||
{
|
||||
param.Money= 0;
|
||||
}
|
||||
|
@ -664,7 +664,7 @@ restartLoop:
|
|||
{
|
||||
dynInfo.Message.serial(param.DynStringId);
|
||||
}
|
||||
catch(Exception &)
|
||||
catch(const Exception &)
|
||||
{
|
||||
param.DynStringId= EmptyDynStringId;
|
||||
}
|
||||
|
|
|
@ -634,7 +634,7 @@ void CMirror::receiveTracker( bool entitiesOrProp, NLNET::CMessage& msgin )
|
|||
++nbSent;
|
||||
}
|
||||
}
|
||||
catch( EMirror& )
|
||||
catch(const EMirror& )
|
||||
{
|
||||
nlwarning( "MIRROR:ROWMGT:ATE> Invalid dataset name %s for adding tracker", name.c_str() );
|
||||
}
|
||||
|
@ -752,7 +752,7 @@ void CMirror::receiveAcknowledgeAddEntityTracker( NLNET::CMessage& msgin, TSe
|
|||
}
|
||||
|
||||
}
|
||||
catch( EMirror& )
|
||||
catch(const EMirror& )
|
||||
{
|
||||
nlwarning( "MIRROR: Invalid dataset name %s for receiving ack of addEntityTracker", datasetname.c_str() );
|
||||
}
|
||||
|
@ -1043,7 +1043,7 @@ void cbAllMirrorsOnline( NLNET::CMessage& msgin, const std::string &/* serviceNa
|
|||
msgin.serial( versionStr );
|
||||
hasVersion = true;
|
||||
}
|
||||
catch ( EStreamOverflow& )
|
||||
catch (const EStreamOverflow&)
|
||||
{}
|
||||
if ( (! hasVersion) || (MirrorVersion != versionStr) )
|
||||
nlerror( "Mirror version mismatch! This service: %s; Local MS: %s", MirrorVersion.c_str(), versionStr.c_str() );
|
||||
|
@ -1174,7 +1174,7 @@ void CMirror::receiveServiceHasMirrorReady( const std::string& serviceName, TSer
|
|||
}
|
||||
}
|
||||
}
|
||||
catch ( EStreamOverflow& )
|
||||
catch (const EStreamOverflow&)
|
||||
{
|
||||
nlwarning( "Received SMIRU from old version service %s-%hu", serviceName.c_str(), serviceId.get() );
|
||||
}
|
||||
|
@ -2484,7 +2484,7 @@ NLMISC_CATEGORISED_COMMAND(mirror, displayMirrorRow, "Display the contents of th
|
|||
return true;
|
||||
}
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
log.displayNL( "Dataset not found" );
|
||||
return true;
|
||||
|
@ -2682,7 +2682,7 @@ NLMISC_CATEGORISED_COMMAND(mirror, displayMirrorEntities, "Display all of part o
|
|||
}
|
||||
}
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
log.displayNL( "Dataset not found" );
|
||||
}
|
||||
|
@ -2727,7 +2727,7 @@ NLMISC_COMMAND( lookForMirrorValue, "Look for values with criteria (Value can be
|
|||
}
|
||||
MirrorInstance->getDataSet( args[0] ).lookForValue( log, propName, anyValue, valueSearchedStr, onlyEntityType, onlyCreatorId, onlyDynamicId, false, true, false, true );
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
log.displayNL( "Dataset not found" );
|
||||
}
|
||||
|
@ -2747,7 +2747,7 @@ NLMISC_CATEGORISED_COMMAND(mirror, displayMirrorTrackers, "Display the trackers
|
|||
{
|
||||
MirrorInstance->getDataSet( args[0] ).displayTrackers( log );
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
log.displayNL( "Dataset not found" );
|
||||
}
|
||||
|
@ -2794,7 +2794,7 @@ NLMISC_CATEGORISED_COMMAND(mirror, rescanExistingEntities, "Scan the entities to
|
|||
CMirroredDataSet& dataset = MirrorInstance->getDataSet( args[0] );
|
||||
MirrorInstance->rescanExistingEntities( dataset, log, true );
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
log.displayNL( "Dataset not found" );
|
||||
}
|
||||
|
@ -2815,7 +2815,7 @@ NLMISC_CATEGORISED_COMMAND(mirror, displayUnknownOnlineEntities, "Scan the entit
|
|||
CMirroredDataSet& dataset = MirrorInstance->getDataSet( args[0] );
|
||||
MirrorInstance->rescanExistingEntities( dataset, log, false );
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
log.displayNL( "Dataset not found" );
|
||||
}
|
||||
|
@ -2844,7 +2844,7 @@ NLMISC_CATEGORISED_COMMAND(mirror, monitorMirrorEntity, "Set/unset an entity for
|
|||
else
|
||||
log.displayNL( "Invalid entity index provided" );
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
log.displayNL( "Dataset not found" );
|
||||
}
|
||||
|
@ -2867,7 +2867,7 @@ NLMISC_CATEGORISED_DYNVARIABLE(mirror, sint32, MainNbEntities, "Number of online
|
|||
{
|
||||
*pointer = MirrorInstance->getDataSet( "fe_temp" ).getNbOnlineEntities();
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
*pointer = -2; // silent
|
||||
}
|
||||
|
@ -2888,7 +2888,7 @@ NLMISC_CATEGORISED_DYNVARIABLE(mirror, sint32, LocalEntities, "Number of online
|
|||
{
|
||||
*pointer = MirrorInstance->getDataSet( "fe_temp" ).getNbOwnedEntities();
|
||||
}
|
||||
catch ( EMirror& )
|
||||
catch (const EMirror&)
|
||||
{
|
||||
*pointer = -2; // silent
|
||||
}
|
||||
|
|
|
@ -580,7 +580,7 @@ void CPredictWeather::generateWeatherStats(const std::string &fileName, const CW
|
|||
outputFile.serial(output[n]);
|
||||
}
|
||||
}
|
||||
catch (NLMISC::EStream &e)
|
||||
catch (const NLMISC::EStream &e)
|
||||
{
|
||||
nlwarning(e.what());
|
||||
}
|
||||
|
|
|
@ -195,11 +195,11 @@ std::string CAIScriptDataManager::dirname()
|
|||
// {
|
||||
// file->load(fullfilename);
|
||||
// }
|
||||
// catch (EFileNotFound e)
|
||||
// catch (const EFileNotFound &e)
|
||||
// {
|
||||
// nlwarning("File not found while trying to load an AI script data file %s", fullfilename.c_str());
|
||||
// }
|
||||
// catch (NLMISC::Exception e)
|
||||
// catch (const NLMISC::Exception &e)
|
||||
// {
|
||||
// nlwarning("Error while loading AI script data file %s", fullfilename.c_str());
|
||||
// }
|
||||
|
|
|
@ -772,7 +772,7 @@ void loadFile_s_(CStateInstance* entity, CScriptStack& stack)
|
|||
// Interpret the code for the group
|
||||
entity->interpretCode(NULL, codePtr);
|
||||
}
|
||||
catch (EPathNotFound e)
|
||||
catch (const EPathNotFound &e)
|
||||
{
|
||||
nlwarning("Path not found while loading AIS script %s", fileName.c_str());
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ static bool LookupShopType(std::string name,std::vector<uint32> &shopList)
|
|||
}
|
||||
}
|
||||
}
|
||||
catch(EUnknownVar &)
|
||||
catch(const EUnknownVar &)
|
||||
{
|
||||
nlwarning("<CShopTypeManager::initShopBase> shop_category.cfg or ShopCategory not found, no shop base type intialized...");
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ void CAIStunEvent::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
// seek takes a param in bytes (8 bits)
|
||||
f.seek( size, NLMISC::IStream::current);
|
||||
}
|
||||
catch(ESeekNotSupported &)
|
||||
catch(const ESeekNotSupported &)
|
||||
{
|
||||
uint8 tmp;
|
||||
for (uint i = 0 ; i < size ; ++i)
|
||||
|
@ -100,7 +100,7 @@ void CAIAggroEvent::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
// seek takes a param in bytes (8 bits)
|
||||
f.seek( size, NLMISC::IStream::current);
|
||||
}
|
||||
catch(ESeekNotSupported &)
|
||||
catch(const ESeekNotSupported &)
|
||||
{
|
||||
uint8 tmp;
|
||||
for (uint i = 0 ; i < size ; ++i)
|
||||
|
@ -150,7 +150,7 @@ void CAIStunEndEvent::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
// seek takes a param in bytes (8 bits)
|
||||
f.seek( size, NLMISC::IStream::current);
|
||||
}
|
||||
catch(ESeekNotSupported &)
|
||||
catch(const ESeekNotSupported &)
|
||||
{
|
||||
uint8 tmp;
|
||||
for (uint i = 0 ; i < size ; ++i)
|
||||
|
@ -198,7 +198,7 @@ void CAISurvivalInstinctEvent::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
// seek takes a param in bytes (8 bits)
|
||||
f.seek( size, NLMISC::IStream::current);
|
||||
}
|
||||
catch(ESeekNotSupported &)
|
||||
catch(const ESeekNotSupported &)
|
||||
{
|
||||
uint8 tmp;
|
||||
for (uint i = 0 ; i < size ; ++i)
|
||||
|
@ -249,7 +249,7 @@ void CAIFearEvent::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
// seek takes a param in bytes (8 bits)
|
||||
f.seek( size, NLMISC::IStream::current);
|
||||
}
|
||||
catch(ESeekNotSupported &)
|
||||
catch(const ESeekNotSupported &)
|
||||
{
|
||||
uint8 tmp;
|
||||
for (uint i = 0 ; i < size ; ++i)
|
||||
|
@ -296,7 +296,7 @@ void CAIFearEndEvent::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
// seek takes a param in bytes (8 bits)
|
||||
f.seek( size, NLMISC::IStream::current);
|
||||
}
|
||||
catch(ESeekNotSupported &)
|
||||
catch(const ESeekNotSupported &)
|
||||
{
|
||||
uint8 tmp;
|
||||
for (uint i = 0 ; i < size ; ++i)
|
||||
|
@ -344,7 +344,7 @@ void CAIHungerEvent::serial(NLMISC::IStream &f) throw(NLMISC::EStream)
|
|||
// seek takes a param in bytes (8 bits)
|
||||
f.seek( size, NLMISC::IStream::current);
|
||||
}
|
||||
catch(ESeekNotSupported &)
|
||||
catch(const ESeekNotSupported &)
|
||||
{
|
||||
uint8 tmp;
|
||||
for (uint i = 0 ; i < size ; ++i)
|
||||
|
|
|
@ -220,7 +220,7 @@ IFileAccess::TReturnCode CLoadFile::execute(CFileAccessManager& manager)
|
|||
fileRead = true;
|
||||
f.close();
|
||||
}
|
||||
catch(NLMISC::Exception &)
|
||||
catch(const NLMISC::Exception &)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ IFileAccess::TReturnCode CWriteFile::execute(CFileAccessManager& manager)
|
|||
if (VerboseLog)
|
||||
nlinfo("%s %u octets to file '%s'", Append ? "Append" : "Save", Data.size(), Filename.c_str());
|
||||
}
|
||||
catch(NLMISC::Exception &)
|
||||
catch(const NLMISC::Exception &)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -384,7 +384,7 @@ static void cbSaveCheckFile( CMessage& msgin, const std::string &serviceName, NL
|
|||
{
|
||||
NLMISC::CFile::copyFile( msg.FileName + string(".backup"), msg.FileName );
|
||||
}
|
||||
catch( Exception &e )
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("Can't write file '%s' size %u : '%s', shard stalled until problem are resolved !!!", ( msg.FileName + string(".backup") ).c_str(), msg.Data.length(), e.what() );
|
||||
// stall shard
|
||||
|
@ -411,7 +411,7 @@ static void cbSaveCheckFile( CMessage& msgin, const std::string &serviceName, NL
|
|||
|
||||
DirStats.writeFile(msg.FileName, msg.Data.length());
|
||||
}
|
||||
catch( Exception &e )
|
||||
catch(const Exception &e)
|
||||
{
|
||||
nlwarning("Can't write file '%s' size %u : '%s', shard stalled until problem are resolved !!!", msg.FileName.c_str(), msg.Data.length(), e.what());
|
||||
// stall shard
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue