Changed: Exceptions catched by reference

This commit is contained in:
kervala 2011-06-03 10:35:25 +02:00
parent a4328f2d8c
commit 06c8ccbfb0
105 changed files with 221 additions and 221 deletions

View file

@ -63,7 +63,7 @@ namespace NLMISC
* printf ("%d ", bar.asInt (i));
* printf("\n");
* }
* catch (EConfigFile &e)
* catch (const EConfigFile &e)
* {
* // Something goes wrong... catch that
* printf ("%s\n", e.what ());

View file

@ -71,7 +71,7 @@ struct EXmlParsingError : public EStream
// File not found
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Something wrong appends
}

View file

@ -64,7 +64,7 @@ namespace NLMISC {
// Close the file
file.close ();
}
catch (Exception &e)
catch (const Exception &e)
{
}
\endcode

View file

@ -94,7 +94,7 @@ CInstanceGroup* LoadInstanceGroup(const char* sFilename)
newIG->serial (file);
// All is good
}
catch (Exception &)
catch (const Exception &)
{
// Cannot save the file
delete newIG;

View file

@ -116,7 +116,7 @@ int main (int /* argc */, char ** /* argv */)
int val = cf.getVar ("unknown_variable").asInt();
nlinfo("unknown_variable = %d", val);
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
nlinfo("something goes wrong with configfile: %s", e.what());
}

View file

@ -190,7 +190,7 @@ void cbInit (CMessage &msgin, TSockId from, CCallbackNetBase &netbase)
return;
}
}
catch (Exception &)
catch (const Exception &)
{
// bad client version, disconnect it
CallbackServer->disconnect (from);
@ -611,7 +611,7 @@ void sendPing ()
// send the new ping to the client
ReceiveTask->DataSock->sendTo (msgout.buffer(), size, GETCLIENTA(it)->Address);
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("Can't send UDP packet to '%s' (%s)", GETCLIENTA(it)->Address.asString().c_str(), e.what());
}
@ -734,7 +734,7 @@ public:
updateStat ();
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlerrornoex ("Exception not catched: '%s'", e.what());
}

View file

@ -371,7 +371,7 @@ int main ()
// Remove mouse listener
pDriver->delete3dMouseListener (plistener);
}
catch (Exception& e)
catch (const Exception& e)
{
#ifdef NL_OS_WINDOWS
::MessageBox (NULL, e.what(), "Test collision move", MB_OK|MB_ICONEXCLAMATION);

View file

@ -485,7 +485,7 @@ NLMISC::IMouseDevice* CDriverD3D::enableLowLevelMouse(bool enable, bool exclusiv
if (diee)
res = diee->getMouseDevice(exclusive);
}
catch (EDirectInput &)
catch (const EDirectInput &)
{
}
}
@ -517,7 +517,7 @@ NLMISC::IKeyboardDevice* CDriverD3D::enableLowLevelKeyboard(bool enable)
if (diee)
res = diee->getKeyboardDevice();
}
catch (EDirectInput &)
catch (const EDirectInput &)
{
}
}
@ -561,7 +561,7 @@ uint CDriverD3D::getDoubleClickDelay(bool hardwareMouse)
{
md = diee->getMouseDevice(hardwareMouse);
}
catch (EDirectInput &)
catch (const EDirectInput &)
{
// could not get device ..
}

View file

@ -684,7 +684,7 @@ NLMISC::IMouseDevice* CDriverGL::enableLowLevelMouse(bool enable, bool exclusive
if (diee)
res = diee->getMouseDevice(exclusive);
}
catch (EDirectInput &)
catch (const EDirectInput &)
{
}
}
@ -722,7 +722,7 @@ NLMISC::IKeyboardDevice* CDriverGL::enableLowLevelKeyboard(bool enable)
if (diee)
res = diee->getKeyboardDevice();
}
catch (EDirectInput &)
catch (const EDirectInput &)
{
}
}
@ -778,7 +778,7 @@ uint CDriverGL::getDoubleClickDelay(bool hardwareMouse)
{
md = diee->getMouseDevice(hardwareMouse);
}
catch (EDirectInput &)
catch (const EDirectInput &)
{
// could not get device ..
}

View file

@ -121,7 +121,7 @@ bool CInstanceGroupUser::init (const std::string &instanceGroup, bool async)
// Read the class
_InstanceGroup.serial (file);
}
catch (EStream& e)
catch (const EStream& e)
{
// Avoid visual warning
EStream ee=e;

View file

@ -283,7 +283,7 @@ void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius, std::s
{
_Landscape->Landscape.checkBinds(Work.Zone->getZoneId());
}
catch (EBadBind &e)
catch (const EBadBind &e)
{
nlwarning ("Bind error : %s", e.what());
nlstopex(("Zone Data Bind Error. Please send a report. You may continue but it should crash!"));

View file

@ -93,7 +93,7 @@ bool CShader::loadShaderFile (const char *filename)
nlwarning ("Can't open the file %s for reading", _filename.c_str());
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("Error while reading %s : %s", _filename.c_str(), e.what());
}

View file

@ -816,7 +816,7 @@ CVegetableShape *CVegetableManager::getVegetableShape(const std::string &shap
ret = NULL;
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Warning
nlwarning ("CVegetableManager::getVegetableShape error while loading shape file '%s' : '%s'", shape.c_str (), e.what ());

View file

@ -844,7 +844,7 @@ void SaveZBuffer (CZoneLighter::CZBuffer &zbuffer, const char *filename)
// Save it
bitmap.writeJPG (outputZFile, 128);
}
catch (Exception& except)
catch (const Exception& except)
{
// Error message
nlwarning ("ERROR writing %s: %s\n", filename, except.what());

View file

@ -105,7 +105,7 @@ CType *CFormLoader::loadType (const char *filename)
type = NULL;
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Output error
warning (false, "loadType", "Error while loading the form (%s): %s", filename, e.what());
@ -179,7 +179,7 @@ CFormDfn *CFormLoader::loadFormDfn (const char *filename, bool forceLoad)
_MapFormDfn.erase (lowerStr);
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Output error
warning (false, "loadFormDfn", "Error while loading the form (%s): %s", filename, e.what());
@ -276,7 +276,7 @@ UForm *CFormLoader::loadForm (const char *filename)
_MapForm.erase (lowerStr);
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Output error
warning (false, "loadForm", "Error while loading the form (%s): %s", filename, e.what());

View file

@ -220,7 +220,7 @@ bool CLigoConfig::readPrimitiveClass (const char *_fileName, bool parsePrimitive
syntaxError (filename.c_str(), root, "Wrong root node, should be NEL_LIGO_PRIMITIVE_CLASS");
}
}
catch (Exception &e)
catch (const Exception &e)
{
errorMessage ("File read error (%s):%s", filename.c_str(), e.what ());
}

View file

@ -146,7 +146,7 @@ void CZoneBank::debugSaveInit (CZoneBankElement &zbeTmp, const string &fileName)
output.init (&fileOut);
zbeTmp.serial (output);
}
catch (Exception& /*e*/)
catch (const Exception& /*e*/)
{
}

View file

@ -832,7 +832,7 @@ void CConfigFile::checkConfigFiles ()
{
(*it)->reparse ();
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
nlwarning ("CF: Exception will re-read modified config file '%s': %s", (*it)->getFilename().c_str(), e.what ());
}

View file

@ -1016,7 +1016,7 @@ void getCallStack(std::string &result, sint skipNFirst)
array[0] = skipNFirst;
RaiseException (0xACE0ACE, 0, 1, array);
}
catch (EDebug &e)
catch (const EDebug &e)
{
result += e.what();
}
@ -1051,7 +1051,7 @@ void getCallStackAndLog (string &result, sint /* skipNFirst */)
// array[0] = skipNFirst;
// RaiseException (0xACE0ACE, 0, 1, array);
// }
// catch (EDebug &e)
// catch (const EDebug &e)
// {
// result += e.what();
// }

View file

@ -120,7 +120,7 @@ void IDisplayer::display ( const CLog::TDisplayInfo& args, const char *message )
{
doDisplay( args, message );
}
catch (Exception &)
catch (const Exception &)
{
// silence
}

View file

@ -365,7 +365,7 @@ void CIFile::getline (char *buffer, uint32 bufferSize)
// read one byte
serialBuffer ((uint8 *)buffer, 1);
}
catch (EFile &)
catch (const EFile &)
{
*buffer = '\0';
return;

View file

@ -155,7 +155,7 @@ void CCallbackNetBase::processOneMessage ()
{
receive (msgin, &tsid);
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning(e.what());
return;

View file

@ -330,7 +330,7 @@ bool sendEmail (const string &smtpServer, const string &from, const string &to,
ok = true;
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("EMAIL: Can't send email: %s", e.what());
goto end;

View file

@ -146,7 +146,7 @@ string CLoginClient::authenticateBegin(const string &loginServiceAddr, const ucs
_LSCallbackClient->disconnect();
_LSCallbackClient->connect (CInetAddress(addr));
}
catch (ESocket &e)
catch (const ESocket &e)
{
delete _LSCallbackClient;
_LSCallbackClient = 0;
@ -226,7 +226,7 @@ string CLoginClient::connectToShard(CLoginCookie &lc, const std::string &addr, C
// have we received the answer?
if (!ShardValidate) return "FES disconnect me";
}
catch (ESocket &e)
catch (const ESocket &e)
{
return string("FES refused the connection (") + e.what () + ")";
}
@ -250,7 +250,7 @@ string CLoginClient::connectToShard (const std::string &addr, CUdpSock &cnx)
//
cnx.connect (CInetAddress(addr));
}
catch (ESocket &e)
catch (const ESocket &e)
{
return string("FES refused the connection (") + e.what () + ")";
}
@ -272,7 +272,7 @@ string CLoginClient::connectToShard (const std::string &addr, CUdpSimSock &cnx)
//
cnx.connect (CInetAddress(addr));
}
catch (ESocket &e)
catch (const ESocket &e)
{
return string("FES refused the connection (") + e.what () + ")";
}

View file

@ -502,7 +502,7 @@ bool CNamingClient::lookupAndConnect (const std::string &name, CCallbackClient &
// connection succeeded
return true;
}
catch (ESocketConnectionFailed &e)
catch (const ESocketConnectionFailed &e)
{
nldebug( "NC: Connection to %s failed: %s, tring another service if available", servaddr.asString().c_str(), e.what() );

View file

@ -1091,7 +1091,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
return 10;
}
}
catch (ESocketConnectionFailed &)
catch (const ESocketConnectionFailed &)
{
nlinfo ("SERVICE: Could not connect to the Naming Service (%s). Retrying in a few seconds...", loc.asString().c_str());
nlSleep (5000);
@ -1495,13 +1495,13 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
MyTAT.deactivate();
}
}
catch (EFatalError &)
catch (const EFatalError &)
{
// Somebody call nlerror, so we have to quit now, the message already display
// so we don't have to to anything
setExitStatus (EXIT_FAILURE);
}
catch (ESocket &e)
catch (const ESocket &e)
{
// Catch NeL network exception to release the system cleanly setExitStatus (EXIT_FAILURE);
ErrorLog->displayNL( "NeL Exception in \"%s\": %s", _ShortName.c_str(), e.what() );
@ -1560,7 +1560,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName,
nlinfo ("SERVICE: Service released successfully");
}
catch (EFatalError &)
catch (const EFatalError &)
{
// Somebody call nlerror, so we have to quit now, the message already display
// so we don't have to to anything

View file

@ -481,7 +481,7 @@ void CAliveCheck::run()
CheckList[i].AddressValid = true;
cbc.disconnect();
}
catch (ESocketConnectionFailed &e)
catch (const ESocketConnectionFailed &e)
{
#if FINAL_VERSION
nlinfo ("HNETL5: can't connect to %s-%hu now (%s)", CheckList[i].ServiceName.c_str(), CheckList[i].ServiceId.get(), e.what ());
@ -587,7 +587,7 @@ bool CUnifiedNetwork::init(const CInetAddress *addr, CCallbackNetBase::TRecordin
{
_CbServer->init(port);
}
catch (ESocket &)
catch (const ESocket &)
{
nlwarning("Failed to init the listen socket on port %u, is the service already running ?", port);
// wait a little before retrying
@ -866,7 +866,7 @@ void CUnifiedNetwork::addService(const string &name, const vector<CInetAddress>
cbc->connect(addr[i]);
connectSuccess = true;
}
catch (ESocketConnectionFailed &e)
catch (const ESocketConnectionFailed &e)
{
nlwarning ("HNETL5: can't connect to %s (sid %u) now (%s) '%s'", name.c_str(), sid.get(), e.what (), addr[i].asString ().c_str());
connectSuccess = false;
@ -1010,7 +1010,7 @@ void CUnifiedNetwork::update(TTime timeout)
laddr[i].setPort(_ServerPort);
CNamingClient::resendRegisteration (_Name, laddr, _SId);
}
catch (ESocketConnectionFailed &)
catch (const ESocketConnectionFailed &)
{
nlwarning ("HNETL5: Could not connect to the Naming Service (%s). Retrying in a few seconds...", _NamingServiceAddr.asString().c_str());
}
@ -1209,7 +1209,7 @@ void CUnifiedNetwork::autoReconnect( CUnifiedConnection &uc, uint connectionInde
// call the user callback
callServiceUpCallback (uc.ServiceName, uc.ServiceId);
}
catch (ESocketConnectionFailed &e)
catch (const ESocketConnectionFailed &e)
{
#if FINAL_VERSION
nlinfo ("HNETL5: can't connect to %s-%hu now (%s)", uc.ServiceName.c_str(), uc.ServiceId.get(), e.what ());

View file

@ -387,7 +387,7 @@ void NLPACS::CGlobalRetriever::makeLinks(uint n)
instance.link(neighbor, _RetrieverBank->getRetrievers());
neighbor.link(instance, _RetrieverBank->getRetrievers());
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("in NLPACS::CGlobalRetriever::makeLinks()");
nlwarning("caught an exception during linkage of %d and %d: %s", instance.getInstanceId(), neighbor.getInstanceId(), e.what());

View file

@ -370,7 +370,7 @@ void CAudioMixerUser::initDriver(const std::string &driverName)
_SoundDriver = ISoundDriver::createDriver(this, driverType);
nlassert(_SoundDriver);
}
catch (ESoundDriver &e)
catch (const ESoundDriver &e)
{
nlwarning(e.what());
delete _SoundDriver; _SoundDriver = NULL;
@ -458,7 +458,7 @@ void CAudioMixerUser::initDevice(const std::string &deviceName, const CInitInfo
manualRolloff = false; // not really needed, but set anyway in case this is still used later in this function
}
}
catch (ESoundDriver &e)
catch (const ESoundDriver &e)
{
nlwarning(e.what());
delete _SoundDriver; _SoundDriver = NULL;
@ -2100,7 +2100,7 @@ uint32 CAudioMixerUser::loadSampleBank(bool async, const std::string &name, st
{
bank->load(async);
}
catch (Exception& e)
catch (const Exception& e)
{
if (notfoundfiles)
{

View file

@ -605,7 +605,7 @@ void CSoundDriverDSound::initDevice(const std::string &device, ISoundDriver::TSo
_SourceCount++;
}
}
catch (ESoundDriver& e)
catch (const ESoundDriver& e)
{
// Okay, here's the situation: I'm listening to WinAmp while debugging.
// The caps told me there were 31 buffers available. In reality, there were

View file

@ -281,7 +281,7 @@ void CSampleBank::load(bool async)
// Warn the sound bank that the sample are available.
CSoundBank::instance()->bufferLoaded(sampleName, ibuffer);
}
catch (ESoundDriver &e)
catch (const ESoundDriver &e)
{
if (ibuffer != NULL) {
delete ibuffer;

View file

@ -120,7 +120,7 @@ bool fillTileFar (uint tile, const char* sName, CTileFarBank::TFarType type, CTi
// Ok.
return true;
}
catch (Exception& except)
catch (const Exception& except)
{
nlwarning ("ERROR %s\n", except.what());
}
@ -409,7 +409,7 @@ int main (int argc, char **argv)
nlwarning ("ERROR Can't open file %s for writing\n", argv[2]);
}
}
catch (Exception& except)
catch (const Exception& except)
{
nlwarning ("ERROR %s\n", except.what());
}

View file

@ -70,7 +70,7 @@ int main(int argc, char* argv[])
}
}
catch (Exception& e)
catch (const Exception& e)
{
// Error
nlwarning ("ERROR fatal error: %s", e.what());

View file

@ -94,7 +94,7 @@ CInstanceGroup* LoadInstanceGroup(const char* sFilename)
newIG->serial (file);
// All is good
}
catch (Exception &)
catch (const Exception &)
{
// Cannot save the file
delete newIG;

View file

@ -37,7 +37,7 @@ CInstanceGroup* LoadInstanceGroup (const char* sFilename)
{
newIG->serial (file);
}
catch (Exception &)
catch (const Exception &)
{
delete newIG;
return NULL;
@ -62,7 +62,7 @@ bool SaveInstanceGroup (const char* sFilename, CInstanceGroup *pIG)
{
pIG->serial (file);
}
catch (Exception &)
catch (const Exception &)
{
return false;
}

View file

@ -106,7 +106,7 @@ struct SExportOptions
CConfigFile::CVar &cvLandFile = cf.getVar("LandFile");
LandFile = cvLandFile.asString();
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
string sTmp = string("ERROR : Error in config file : ") + e.what() + "\n";
outString (sTmp);
@ -173,7 +173,7 @@ CZoneRegion *loadLand (const string &filename)
outString (sTmp);
}
}
catch (Exception& e)
catch (const Exception& e)
{
string sTmp = string("Error in land file : ") + e.what();
outString (sTmp);
@ -194,7 +194,7 @@ CInstanceGroup* LoadInstanceGroup (const char* sFilename)
{
newIG->serial (file);
}
catch (Exception &)
catch (const Exception &)
{
// Cannot save the file
delete newIG;
@ -220,7 +220,7 @@ void SaveInstanceGroup (const char* sFilename, CInstanceGroup *pIG)
{
pIG->serial (file);
}
catch (Exception &e)
catch (const Exception &e)
{
outString(string(e.what()));
}
@ -339,7 +339,7 @@ int main(int nNbArg, char**ppArgs)
HeightMap1 = NULL;
}
}
catch (Exception &e)
catch (const Exception &e)
{
string sTmp = string("Cant load height map : ") + options.HeightMapFile1 + " : " + e.what();
outString (sTmp);
@ -365,7 +365,7 @@ int main(int nNbArg, char**ppArgs)
HeightMap2 = NULL;
}
}
catch (Exception &e)
catch (const Exception &e)
{
string sTmp = string("Cant load height map : ") + options.HeightMapFile2 + " : " + e.what() + "\n";
outString (sTmp);

View file

@ -344,7 +344,7 @@ int main(int argc, char* argv[])
}
}
catch (Exception& except)
catch (const Exception& except)
{
// Error message
nlwarning ("ERROR %s\n", except.what());

View file

@ -111,7 +111,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
{
settings.input_path = CPath::standardizePath(cf.getVar("input_path").asString());
}
catch (EUnknownVar &)
catch (const EUnknownVar &)
{
}
@ -120,7 +120,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
{
settings.output_path = CPath::standardizePath(cf.getVar("output_path").asString());
}
catch (EUnknownVar &)
catch (const EUnknownVar &)
{
}
@ -171,7 +171,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
CPath::remapExtension(extensions_remapping.asString(i), extensions_remapping.asString(i+1), true);
}
}
catch (EUnknownVar &)
catch (const EUnknownVar &)
{
}
@ -223,7 +223,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
settings.output_background.G = (uint8)var.asInt(1);
settings.output_background.B = (uint8)var.asInt(2);
}
catch (EUnknownVar &)
catch (const EUnknownVar &)
{
settings.output_background = CRGBA::Black;
}
@ -236,7 +236,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
settings.light_ambiant.G = (uint8)var.asInt(1);
settings.light_ambiant.B = (uint8)var.asInt(2);
}
catch (EUnknownVar &)
catch (const EUnknownVar &)
{
settings.light_ambiant = CRGBA::White;
}
@ -249,7 +249,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
settings.light_diffuse.G = (uint8)var.asInt(1);
settings.light_diffuse.B = (uint8)var.asInt(2);
}
catch (EUnknownVar &)
catch (const EUnknownVar &)
{
settings.light_diffuse = CRGBA::White;
}
@ -262,7 +262,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
settings.light_specular.G = (uint8)var.asInt(1);
settings.light_specular.B = (uint8)var.asInt(2);
}
catch (EUnknownVar &)
catch (const EUnknownVar &)
{
settings.light_specular = CRGBA::White;
}
@ -273,7 +273,7 @@ bool ShapesExporter::parseConfigFile(const string &filename)
CConfigFile::CVar &var = cf.getVar("light_direction");
settings.light_direction = CVector(var.asFloat(0), var.asFloat(1), var.asFloat(2));
}
catch (EUnknownVar &)
catch (const EUnknownVar &)
{
settings.light_direction = CVector(0.f, 1.f, 0.f);
}

View file

@ -63,7 +63,7 @@ int main(int argc, char *argv[])
}
btmp.writeTGA(outFile, depth);
}
catch (Exception &e)
catch (const Exception &e)
{
printf("Error: %s\n", e.what());
return -1;

View file

@ -385,7 +385,7 @@ int main (int argc, char* argv[])
if (newZ<minZ)
minZ=newZ;
}
catch (Exception& e)
catch (const Exception& e)
{
// Error handling
nlwarning ("ERROR in file %s, %s", (dir+zoneName+ext).c_str(), e.what ());
@ -571,7 +571,7 @@ int main (int argc, char* argv[])
nlwarning ("ERROR %s is not a valid zone name.\n", firstName.c_str());
}
}
catch (Exception &ee)
catch (const Exception &ee)
{
nlwarning ("ERROR %s\n", ee.what());
}

View file

@ -211,7 +211,7 @@ int main(int argc, char* argv[])
}
}
}
catch (Exception& e)
catch (const Exception& e)
{
fprintf (stderr, "FATAL: %s", e.what());
}

View file

@ -241,7 +241,7 @@ int main(int argc, char* argv[])
landscape->TileBank.serial (inputFile);
landscape->initTileBanks();
}
catch (Exception &e)
catch (const Exception &e)
{
// Error
nlwarning ("ERROR error loading tile bank %s\n%s\n", bank_name.c_str(), e.what());
@ -515,7 +515,7 @@ int main(int argc, char* argv[])
// Save the new ig
outputFile.serial(output);
}
catch (Exception& except)
catch (const Exception& except)
{
// Error message
nlwarning ("ERROR writing %s: %s\n", argv[2], except.what());
@ -533,7 +533,7 @@ int main(int argc, char* argv[])
nlwarning ("ERROR Abort: files are missing.\n");
}
}
catch (Exception& except)
catch (const Exception& except)
{
// Error message
nlwarning ("ERROR %s\n", except.what());

View file

@ -518,7 +518,7 @@ int main(int argc, char* argv[])
landscape->TileBank.serial (inputFile);
landscape->initTileBanks();
}
catch (Exception &e)
catch (const Exception &e)
{
// Error
nlwarning ("ERROR error loading tile bank %s\n%s\n", bankName.c_str(), e.what());
@ -835,7 +835,7 @@ int main(int argc, char* argv[])
// load it
output.serial (zonelFile);
}
catch (Exception& except)
catch (const Exception& except)
{
// Error message
nlwarning ("ERROR reading %s: %s\n", argv[2], except.what());
@ -860,7 +860,7 @@ int main(int argc, char* argv[])
{
output.serial (outputFile);
}
catch (Exception& except)
catch (const Exception& except)
{
nlwarning ("ERROR backuping %s: %s\n", bkupFile.c_str(), except.what());
}
@ -886,7 +886,7 @@ int main(int argc, char* argv[])
// Save it
output.serial (outputFile);
}
catch (Exception& except)
catch (const Exception& except)
{
// Error message
nlwarning ("ERROR writing %s: %s\n", argv[2], except.what());
@ -909,7 +909,7 @@ int main(int argc, char* argv[])
nlwarning ("ERROR Abort: files are missing.\n");
}
}
catch (Exception& except)
catch (const Exception& except)
{
// Error message
nlwarning ("ERROR %s\n", except.what());

View file

@ -940,7 +940,7 @@ void initViewerConfig(const char * configFileName)
}
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
nlerror("Problem in config file : %s\n", e.what ());
}
@ -985,7 +985,7 @@ int main(int /* argc */, char ** /* argv */)
// release nelu
NL3D::CNELU::release();
}
catch (Exception &e)
catch (const Exception &e)
{
nlerror("main trapped an exception: '%s'", e.what ());
}

View file

@ -193,7 +193,7 @@ public:
{
invokeModuleOperation(proxy, msg, resp);
}
catch(IModule::EInvokeFailed)
catch(const IModule::EInvokeFailed &)
{
ResponseReceived++;
}

View file

@ -112,7 +112,7 @@ void init()
CPath::addSearchPath(cvPathes.asString(i));
}
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
printf ("Problem in config file : %s\n", e.what ());
}
@ -219,7 +219,7 @@ int main(int argc, char **argv)
COFile output(Output);
output.serialCont(Boxes);
}
catch (Exception &e)
catch (const Exception &e)
{
fprintf (stderr,"main trapped an exception: '%s'\n", e.what ());
}

View file

@ -146,7 +146,7 @@ void initConfig()
for (i=0; i<(uint)meshes.size(); i++)
Meshes.push_back(meshes.asString(i));
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
printf ("Problem in config file : %s\n", e.what ());
}
@ -195,7 +195,7 @@ void makeGlobalRetriever(vector<CVector> &translation)
ninst.push_back(iid);
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("WARNING: can't merge lr '%s.lr': %s", Meshes[i].c_str(), e.what());
}
@ -303,7 +303,7 @@ void createRetriever(vector<CVector> &translation)
// Save the lr file
serialAndSave(lr, OutputPath+meshName+".lr");
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("WARNING: can compute lr '%s.lr': %s", meshName.c_str(), e.what());
}

View file

@ -264,7 +264,7 @@ void tessellateAndMoulineZone(string &zoneName)
nlinfo("WARNING: IG list no found");
}
}
catch (Exception &) { nlinfo("WARNING: IG list no found"); }
catch (const Exception &) { nlinfo("WARNING: IG list no found"); }
for (i=0; i<boxes.size(); ++i)
{
@ -320,7 +320,7 @@ void tessellateAndMoulineZone(string &zoneName)
}
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("%s", e.what());
}
@ -933,7 +933,7 @@ void processGlobalRetriever()
globalRetriever.makeInstance(retrieverId, 0, getZoneCenterById((uint16)getIdByCoord(x, y)));
}
}
catch (Exception &e)
catch (const Exception &e)
{
printf("%s\n", e.what ());
}

View file

@ -753,7 +753,7 @@ bool NLPACS::CZoneTessellation::setup(uint16 zoneId, sint16 refinement, const CV
if (CPath::lookup(getZoneNameById(zoneId)+ZoneExt, false, false) == "")
return false;
}
catch (EPathNotFound &)
catch (const EPathNotFound &)
{
return false;
}

View file

@ -258,7 +258,7 @@ void initMoulinette()
ZoneNames.push_back(cvZones->asString(i));
}
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
nlwarning("Problem in config file : %s\n", e.what ());
}
@ -383,7 +383,7 @@ int main(int argc, char **argv)
if (Verbose)
nlinfo("total computation time: %d days, %d hours, %d minutes and %d seconds", workDay, workHour, workMinute, workSecond);
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("main trapped an exception: '%s'\n", e.what ());
}

View file

@ -171,7 +171,7 @@ bool CPrimChecker::build(const string &primitivesPath, const string &igLandPath,
}
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("%s", e.what());
}

View file

@ -517,7 +517,7 @@ void CBGDownloaderAccess::CDownloadCoTask::restartDownloader()
ok = true;
break;
}
catch (EWaitMessageTimeoutException &)
catch (const EWaitMessageTimeoutException &)
{
// no-op, just continue the loop for another try
}

View file

@ -85,7 +85,7 @@ void CCDBSynchronised::init( const string &fileName, NLMISC::IProgressCallback &
_Database->init( read.getRootNode (), progressCallBack, true );
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Output error
nlwarning ("CFormLoader: Error while loading the form %s: %s", fileName.c_str(), e.what());

View file

@ -2017,7 +2017,7 @@ void CClientConfig::release ()
// Save the camera distance
writeDouble("CameraDistance", ClientCfg.CameraDistance);
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("Error while set config file variables : %s", e.what ());
}

View file

@ -1096,7 +1096,7 @@ NLMISC_COMMAND(execScript, "Execute a script file (.cmd)","<FileName>")
// read one byte
iFile.serialBuffer ((uint8 *)buffer, 1);
}
catch (EFile &)
catch (const EFile &)
{
*buffer = '\0';
eof = true;

View file

@ -473,7 +473,7 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
// Set the texture for the coarse mesh manager
Scene->setCoarseMeshManagerTexture (CPath::lookup(seasonname).c_str());
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning (e.what());
}
@ -509,7 +509,7 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
{
LandscapeIGManager.initIG (Scene, CPath::lookup(LandscapeIG).c_str(), Driver, Season, &progress);
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning (e.what());
}
@ -641,7 +641,7 @@ void CContinent::select(const CVectorD &pos, NLMISC::IProgressCallback &progress
BackgroundIG = UInstanceGroup::createInstanceGroup(BackgroundIGName);
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning (e.what());
}

View file

@ -1105,7 +1105,7 @@ void prelogInit()
FPU_CHECKER_ONCE
}
catch (Exception &e)
catch (const Exception &e)
{
ExitClientError (e.what());
}
@ -1433,7 +1433,7 @@ void postlogInit()
nlinfo ("PROFILE: %d seconds for postlogInit", (uint32)(ryzomGetLocalTime ()-initStart)/1000);
}
catch (Exception &e)
catch (const Exception &e)
{
ExitClientError (e.what());
}

View file

@ -518,7 +518,7 @@ bool CInputHandlerManager::readInputConfigFile(const std::string & fileName)
root = read.getRootNode();
}
catch (Exception &e)
catch (const Exception &e)
{
// Output error
root = NULL;

View file

@ -4790,7 +4790,7 @@ bool CInterfaceManager::saveKeys(const std::string &filename)
nlwarning ("Can't open the file %s", filename.c_str());
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("Error while writing the file %s : %s. Remove it.", filename.c_str(), e.what ());
CFile::deleteFile(filename);
@ -6079,7 +6079,7 @@ void CInterfaceManager::createLocalBranch(const std::string &fileName, NLMISC::I
ServerToLocalAutoCopySkillPoints.init("USER");
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Output error
nlwarning ("CFormLoader: Error while loading the form %s: %s", fileName.c_str(), e.what());

View file

@ -685,7 +685,7 @@ bool CInterfaceParser::parseInterface (const std::vector<std::string> & strings,
i++;
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Output error
// todo hulud interface syntax error

View file

@ -378,7 +378,7 @@ bool CLuaState::executeScriptNoThrow(const std::string &code, int numRet)
{
executeScript(code, numRet);
}
catch (ELuaError &e)
catch (const ELuaError &e)
{
nlwarning(e.what());
return false;

View file

@ -233,7 +233,7 @@ bool CLuaIHM::pop(CLuaState &ls, NLMISC::CRGBA &dest)
#endif
dest = luabind::object_cast<NLMISC::CRGBA>(obj);
}
catch(luabind::cast_failed &)
catch(const luabind::cast_failed &)
{
return false;
}
@ -256,7 +256,7 @@ bool CLuaIHM::pop(CLuaState &ls,NLMISC::CVector2f &dest)
#endif
dest = luabind::object_cast<NLMISC::CVector2f>(obj);
}
catch(luabind::cast_failed &)
catch(const luabind::cast_failed &)
{
return false;
}
@ -279,7 +279,7 @@ bool CLuaIHM::pop(CLuaState &ls, ucstring &dest)
#endif
dest = luabind::object_cast<ucstring>(obj);
}
catch(luabind::cast_failed &)
catch(const luabind::cast_failed &)
{
return false;
}
@ -3354,7 +3354,7 @@ bool CLuaIHM::popString(CLuaState &ls, std::string & dest)
#endif
dest = luabind::object_cast<std::string>(obj);
}
catch(luabind::cast_failed &)
catch(const luabind::cast_failed &)
{
return false;
}
@ -3376,7 +3376,7 @@ bool CLuaIHM::popSINT32(CLuaState &ls, sint32 & dest)
#endif
dest = luabind::object_cast<sint32>(obj);
}
catch(luabind::cast_failed &)
catch(const luabind::cast_failed &)
{
return false;
}

View file

@ -1203,7 +1203,7 @@ void CPatchManager::getServerFile (const std::string &name, bool bZipped, const
downloadSuccess = true;
}
catch (EPatchDownloadException& e)
catch (const EPatchDownloadException& e)
{
//nlwarning("EXCEPTION CATCH: getServerFile() failed - try to find an alternative: %i: %s",UsedServer,PatchServers[UsedServer].DisplayedServerPath.c_str());
@ -2501,7 +2501,7 @@ void CCheckThread::run ()
CheckOk = false;
Ended = true;
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("EXCEPTION CATCH: CCheckThread::run() failed");
ucstring sTranslate = CI18N::get("uiCheckEndWithErr") + " " + e.what();
@ -3139,7 +3139,7 @@ void CScanDataThread::run ()
CheckOk = true;
Ended = true;
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("EXCEPTION CATCH: CScanDataThread::run() failed");
ucstring sTranslate = CI18N::get("uiCheckEndWithErr") + " " + e.what();

View file

@ -3777,7 +3777,7 @@ void updateMovieShooting()
{
MovieShooter.replayMovie(Driver, TextContext);
}
catch (Exception &e)
catch (const Exception &e)
{
Driver->systemMessageBox(e.what(), "MovieShooter");
}
@ -3815,7 +3815,7 @@ void updateMovieShooting()
// Save the movie.
MovieShooter.saveMovie(Driver, TextContext, theDir.c_str(), ClientCfg.MovieShooterFramePeriod, ClientCfg.MovieShooterBlend, ClientCfg.MovieShooterPrefix.c_str());
}
catch (Exception &e)
catch (const Exception &e)
{
Driver->systemMessageBox(e.what(), "MovieShooter");
}

View file

@ -616,7 +616,7 @@ bool CNetworkConnection::connect(string &result)
nlinfo ("Can't copy, same path '%s'", arg1.c_str());
}
}
catch (Exception &)
catch (const Exception &)
{
nlwarning ("Can't copy '%s' '%s', try the next file", arg1.c_str(), dstPath.c_str());
}
@ -624,7 +624,7 @@ bool CNetworkConnection::connect(string &result)
break;
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning (e.what ());
}
@ -635,7 +635,7 @@ bool CNetworkConnection::connect(string &result)
}
}
}
catch (Exception &)
catch (const Exception &)
{
nlinfo ("There's no shards.cfg, or bad file format, can't copy common files");
}
@ -654,7 +654,7 @@ bool CNetworkConnection::connect(string &result)
//
_Connection.connect (CInetAddress(_FrontendAddress));
}
catch (ESocket &e)
catch (const ESocket &e)
{
result = toString ("FS refused the connection (%s)", e.what());
return false;
@ -847,7 +847,7 @@ bool CNetworkConnection::update()
}
while (stateBroke);// && _TotalMessages<5);
}
catch (ESocket &)
catch (const ESocket &)
{
_ConnectionState = Disconnect;
}
@ -2708,7 +2708,7 @@ void CNetworkConnection::send(TGameCycle cycle)
sendNormalMessage();
}
}
catch (ESocket &/*e*/)
catch (const ESocket &/*e*/)
{
_ConnectionState = Disconnect;
disconnect(); // won't send disconnection message as state is already Disconnect
@ -2732,7 +2732,7 @@ void CNetworkConnection::send()
sendNormalMessage();
}
}
catch (ESocket &/*e*/)
catch (const ESocket &/*e*/)
{
_ConnectionState = Disconnect;
}

View file

@ -167,7 +167,7 @@ void CPrimFileMgr::load (sint primFileIndex)
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Error
nlwarning ("Error while reading the prim file (%s) : %s", pathName.c_str(), e.what ());

View file

@ -5038,7 +5038,7 @@ void CEditor::onErase(CObject *root, bool &foundInBase, std::string &nameInParen
{
(*inst).getLuaProjection()["User"].setValue("Erased", true);
}
catch (ELuaNotATable &e)
catch (const ELuaNotATable &e)
{
nlwarning(e.what());
}

View file

@ -419,7 +419,7 @@ CPackedWorld *CIslandCollision::reloadPackedIsland(const CScenarioEntryPoints::C
_PackedIslandName = islandDesc.Island;
_IslandDesc = islandDesc;
}
catch (Exception &)
catch (const Exception &)
{
_PackedIslandLoadingFailure = true;
}

View file

@ -1732,7 +1732,7 @@ void CSoundManager::updateEventAndGameMusicVolume()
materials.push_back( cvMaterials.asInt(i) );
}
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
nlerror("Problem in the file %s : %s", fileName,e.what ());
}
@ -1786,7 +1786,7 @@ void CSoundManager::updateEventAndGameMusicVolume()
}
_Sounds.insert( make_pair( make_pair(moveType,soft), sounds) );
}
catch (EConfigFile &e)
catch (const EConfigFile &e)
{
nlwarning("Problem in the sounds by material config file : %s", e.what ());
}

View file

@ -772,7 +772,7 @@ void loadFile_s_(CStateInstance* entity, CScriptStack& stack)
// Interpret the code for the group
entity->interpretCode(NULL, codePtr);
}
catch (const EPathNotFound &e)
catch (const EPathNotFound &)
{
nlwarning("Path not found while loading AIS script %s", fileName.c_str());
}

View file

@ -1192,7 +1192,7 @@ CSmartPtr<const AIVM::CByteCode> CCompiler::compileCodeOld (const string &source
return tmp;
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("compilation failed for %s", fullName.c_str());
nlwarning(e.what());

View file

@ -632,7 +632,7 @@ void AISHEETS::CCreature::readGeorges(NLMISC::CSmartPtr<NLGEORGES::UForm> const&
scriptComp = CFightScriptCompReader::createScriptComp(scriptCompStr);
registerScriptComp(scriptComp);
}
catch (ReadFightActionException& ex)
catch (const ReadFightActionException& ex)
{
nlwarning("script read error (ignored): %s", ex.what());
}
@ -769,7 +769,7 @@ void AISHEETS::CCreature::serial(NLMISC::IStream &s)
scriptComp = CFightScriptCompReader::createScriptComp(scriptCompStr);
registerScriptComp(scriptComp);
}
catch (ReadFightActionException& ex)
catch (const ReadFightActionException& ex)
{
nlwarning("script read error (ignored): %s", ex.what());
}

View file

@ -82,7 +82,7 @@ void CWorldContainer::loadContinent(const string &name)
msg.send("EGS");
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("Unable to load continent '%s', aborted (%s)", name.c_str(), e.what());
}

View file

@ -1348,7 +1348,7 @@ static void parsePrimGrpFaunaSpawn(const CAIAliasDescriptionNode *treeNode,const
executeArgs.push_back(CAIActions::CArg(theSheet));
executeArgs.push_back(count);
}
catch (parsePopException e)
catch (const parsePopException &e)
{
nlwarning("FaunaGroup: %s of %s : %s", nodeName(child).c_str(), treeNode->fullName().c_str(), e.what());
}
@ -2850,7 +2850,7 @@ static void parsePrimGroupTemplate(const CAIAliasDescriptionNode *aliasNode, con
executeArgs.push_back(CAIActions::CArg(theSheet));
executeArgs.push_back(count);
}
catch (parsePopException e)
catch (const parsePopException &e)
{
nlwarning("FaunaGroup: %s of %s : %s", nodeName(child).c_str(), aliasNode->fullName().c_str(), e.what());
}

View file

@ -116,7 +116,7 @@ void updateWebConnection()
success = true;
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("Error during receiving: '%s'", e.what ());
reason = e.what();
@ -138,7 +138,7 @@ void updateWebConnection()
}
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("Error during update: '%s'", e.what ());
}

View file

@ -97,7 +97,7 @@ void cbStallMode( NLNET::CMessage& msgin, const std::string &serviceName, NLNET:
CUnifiedNetwork::getInstance()->send("TICKS", msgout);
}
}
catch (Exception&)
catch (const Exception&)
{
}

View file

@ -584,7 +584,7 @@ bool loadAndResaveCheckCharacters( const std::vector<string>& files, NLMISC::CLo
if (!(dump1 == dump2))
log.displayNL("WARNING: character %d:%d changed after saving!", id.PlayerId, id.Chars[i].CharId );
}
catch (Exception& e)
catch (const Exception& e)
{
log.displayNL("Exception caught while executing command '%s' (%s): %s", currentCommand.c_str(), currentState.c_str(), e.what());
result = false;
@ -3856,7 +3856,7 @@ NLMISC_COMMAND(displayDatabaseEntry," display a database entry value","<entity i
sint64 value = e->_PropertyDatabase.x_getProp(entry);
log.displayNL("For player %s, buffer %s : value %"NL_I64"d", id.toString().c_str(), entry.c_str(), value );
}
catch ( CCDBSynchronised::ECDBNotFound &)
catch (const CCDBSynchronised::ECDBNotFound &)
{
log.displayNL("%s isn't a valid database entry", entry.c_str());
}
@ -3897,7 +3897,7 @@ NLMISC_COMMAND( db, "Display or set the value of a property in the database", "<
log.displayNL( "%"NL_I64"d", value );
res = true;
}
catch ( CCDBSynchronised::ECDBNotFound& )
catch (const CCDBSynchronised::ECDBNotFound& )
{
res = false;
}

View file

@ -90,7 +90,7 @@ bool CGuildCharge::build( NLMISC::TStringId civ, const std::vector<std::string>
return true;
}
}
catch (Exception & e)
catch (const Exception & e)
{
nlwarning("<CGuildCharge build> file '%s' exception '%s'",_FileName.c_str(),e.what());
return false;
@ -197,7 +197,7 @@ void CGuildCharge::save()
}
}
}
catch (Exception & e)
catch (const Exception & e)
{
nlwarning("<CGuildCharge save> file %s exception '%s'",_FileName.c_str(),e.what());
}

View file

@ -398,7 +398,7 @@ NLMISC_COMMAND( guildDB, "Display or set the value of a property in the guild da
sint64 val = guild->_DbGroup.Database.x_getProp(args[1]);
log.displayNL( "property value is '%"NL_I64"d'", val );
}
catch ( CCDBSynchronised::ECDBNotFound& e )
catch (const CCDBSynchronised::ECDBNotFound &e)
{
log.displayNL( "exception %s", e.what() );
}

View file

@ -362,7 +362,7 @@ void CAsyncPlayerLoad::receivedCharacterFile(const CFileDescription& fileDescrip
success = true;
}
}
catch (Exception& e)
catch (const Exception& e)
{
reason = e.what();
}
@ -1504,7 +1504,7 @@ NLMISC_CATEGORISED_COMMAND(egs, convertToPdr, "Load all possible characters from
}
}
}
catch (Exception& e)
catch (const Exception& e)
{
reason = e.what();
}

View file

@ -282,7 +282,7 @@ public:
// success = (_CharLoadCb == NULL || _CharLoadCb(player->UserId, charId, pdr));
// }
// }
// catch (Exception& e)
// catch (const Exception& e)
// {
// nlwarning("Failed to load user '%d' character '%d' from BS pdr stream: %s", player->UserId, charId, e.what());
// }

View file

@ -105,7 +105,7 @@ void CPositionFlagManager::serial(NLMISC::IStream & f) throw(NLMISC::EStream)
f.xmlPushEnd();
f.xmlPop();
}
catch (EStream &)
catch (const EStream &)
{
BOMB("<CPositionFlagManager::serial> invalid size or invalid flag", break);
}

View file

@ -60,7 +60,7 @@ void CNamedItems::loadNamedItemsFromFile(const std::string & fileName)
{
path = CPath::lookup(fileName);
}
catch (Exception &)
catch (const Exception &)
{
nlwarning("<NAMED_ITEMS> file '%s' was not found", fileName.c_str());
return;

View file

@ -470,7 +470,7 @@ void CWorldPositionManager::loadPatatManagerFile(const string &file)
f.serial(_PatatSubscribeManager);
_PatatSubscribeManager.displayPatatGridInfo();
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("Couldn't load manager file '%s': %s", file.c_str(), e.what());
}
@ -490,7 +490,7 @@ void CWorldPositionManager::savePatatManagerFile(const string &file)
f.serial(_PatatSubscribeManager);
_PatatSubscribeManager.displayPatatGridInfo();
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning("Couldn't save manager file '%s': %s", file.c_str(), e.what());
}

View file

@ -986,7 +986,7 @@ void cbNpcTell( CMessage& msgin, const string &serviceName, TServiceId serviceId
// CChatClient &client = cm.getClient(sender);
cm.sendChat2(CChatGroup::tell, receiver, phraseId, sender);
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("cbNpcTell : ignoring chat because NPC info not available yet");
}
@ -1037,7 +1037,7 @@ void cbNpcTellEx( CMessage& msgin, const string &serviceName, TServiceId service
// CChatClient &client = cm.getClient(sender);
cm.sendChat2Ex(CChatGroup::tell, receiver, phraseId, sender);
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("cbNpcTell : ignoring chat because NPC info not available yet");
}
@ -1075,7 +1075,7 @@ void cbNpcChatEx( CMessage& msgin, const string &serviceName, TServiceId service
client.updateAudience();
cm.chat2Ex(sender, phraseId);
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("cbNpcChatEx : ignoring chat because NPC info not available yet");
}
@ -1112,7 +1112,7 @@ void cbNpcChat( CMessage& msgin, const string &serviceName, TServiceId serviceId
client.updateAudience();
cm.chat2(sender, phraseId);
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("cbNpcChat : ignoring chat because NPC info not available yet");
}
@ -1159,7 +1159,7 @@ void cbNpcChatParam( CMessage& msgin, const string &serviceName, NLNET::TService
client.updateAudience();
cm.chatParam(sender, phraseId, params);
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("cbNpcChat : ignoring chat because NPC info not available yet");
}
@ -1196,7 +1196,7 @@ void cbNpcChatSentence( CMessage& msgin, const string &serviceName, TServiceId s
client.updateAudience();
cm.chat(sender, sentence);
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("cbNpcChatSentence : ignoring chat because NPC info not available yet");
}
@ -1316,7 +1316,7 @@ void cbGroupDynString( CMessage& msgin, const string &serviceName, TServiceId se
}
}
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("cbGroupDynString : ignoring group message because entity info not available yet");
}
@ -1500,7 +1500,7 @@ void cbEmoteCrowd( CMessage& msgin, const string &serviceName, TServiceId servic
// send the phrase
cm.sendEmoteTextToAudience(sender, phraseTextId, params,ignored);
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("cbNpcChatEx : ignoring chat because NPC info not available yet");
}
@ -1549,7 +1549,7 @@ void cbCustomEmote( CMessage& msgin, const string &serviceName, TServiceId servi
// send the phrase
cm.sendEmoteCustomTextToAll(sender, emoteCustomText);
}
catch(const CChatManager::EChatClient &e)
catch(const CChatManager::EChatClient &)
{
nlwarning("<cbCustomEmote> exception, ignoring emote");
}

View file

@ -192,7 +192,7 @@ NLMISC_CATEGORISED_COMMAND(pd_log, displayLogFile, "display pd_log file human re
{
ifile.serialCont(updateLog);
}
catch (Exception& e)
catch (const Exception& e)
{
log.displayNL("#! Failed to load file '%s': %s", filename.c_str(), e.what());
return false;
@ -257,7 +257,7 @@ NLMISC_CATEGORISED_COMMAND(pd_log, displayLog, "display pd_log file human readab
{
ifile.serialCont(updateLog);
}
catch (Exception& e)
catch (const Exception& e)
{
log.displayNL("#! Failed to load file '%s': %s", filename.c_str(), e.what());
return false;

View file

@ -612,7 +612,7 @@ void CLogAnalyserService::updateWebConnection()
reason = "unknown command "+toString(messageType);
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("Error during receiving: '%s'", e.what ());
reason = e.what();
@ -634,7 +634,7 @@ void CLogAnalyserService::updateWebConnection()
}
}
}
catch (Exception &e)
catch (const Exception &e)
{
nlwarning ("Error during update: '%s'", e.what ());
}

View file

@ -157,7 +157,7 @@ CQueryParser::TParserResult CQueryParser::parseQuery(const std::string &queryStr
return pr;
}
catch (EInvalidQuery &iq)
catch (const EInvalidQuery &iq)
{
nlwarning("Error will parsing query near char %u : %s", iq.It - queryStr.begin(), iq.ErrorStr);

View file

@ -1150,7 +1150,7 @@ public:
_QueryStatus.write(TThreadStatus(qs_lql_state, toString("Finished query %u", queryNumber)));
}
catch (CQueryParser::EInvalidQuery iq)
catch (const CQueryParser::EInvalidQuery &iq)
{
uint index= (uint)(iq.It - query.begin());
_QueryStatus.write(TThreadStatus(qs_log, toString("Error will parsing query near char %u : %s", index+1, iq.ErrorStr)));

View file

@ -291,7 +291,7 @@ bool CHoFGenerator::parseHDTFile(const std::string & fileName, CParsedData & par
H_AUTO(CHoFGenerator_parseHDTFile_1);
cfgFile.load(fileName);
}
catch (Exception & e)
catch (const Exception & e)
{
nlwarning("cannot load file '%s' : %s", fileName.c_str(), e.what());
return false;

View file

@ -101,7 +101,7 @@ bool CDBDeltaFile::write(uint32 index, const uint8* rowdata)
return false;
}
}
catch (Exception& e)
catch (const Exception& e)
{
nlwarning("CDBDeltaFile::write(): failed, cannot write file '%s' header, exception '%s'", filepath.c_str(), e.what());
return false;
@ -243,7 +243,7 @@ bool CDBDeltaFile::preload()
return false;
}
}
catch (Exception& e)
catch (const Exception& e)
{
nlwarning("CDBDeltaFile::read(): failed, cannot write file '%s' header, exception '%s'", filepath.c_str(), e.what());
return false;

View file

@ -93,7 +93,7 @@ bool CDBDescriptionParser::loadDescription(const uint8* description)
if (xmlStream.init(stream))
xmlParsed = true;
}
catch (EXmlParsingError &e)
catch (const EXmlParsingError &e)
{
nlwarning("CDBDescriptionParser::loadDescription(): failed, parse error in xml: %s", e.what());
return false;

View file

@ -203,7 +203,7 @@ bool CDBReferenceFile::prewrite(bool failIfNotExist)
return false;
}
}
catch (Exception& e)
catch (const Exception& e)
{
nlwarning("CDBReferenceFile::prewrite(): failed, cannot read file '%s' header, exception '%s'", filepath.c_str(), e.what());
return false;
@ -246,7 +246,7 @@ bool CDBReferenceFile::postwrite()
return false;
}
}
catch (Exception& e)
catch (const Exception& e)
{
nlwarning("CDBReferenceFile::postwrite(): failed, cannot read file '%s' header, exception '%s'", filepath.c_str(), e.what());
return false;
@ -409,7 +409,7 @@ bool CDBReferenceFile::preload()
return false;
}
}
catch (Exception& e)
catch (const Exception& e)
{
nlwarning("CDBReferenceFile::preload(): failed, cannot read file '%s' header, exception '%s'", filepath.c_str(), e.what());
return false;

View file

@ -1145,7 +1145,7 @@ NLMISC_DYNVARIABLE(uint, EnqueuedPDMessages, "Tells number of messages enqueued
// {
// updateLog.serial(ifile);
// }
// catch (Exception& e)
// catch (const Exception& e)
// {
// nlwarning("Failed to load file '%s': %s", filename.c_str(), e.what());
// return false;

View file

@ -49,7 +49,7 @@ bool CRefIndex::load(const string& filename)
{
serial(ixml);
}
catch (Exception&)
catch (const Exception&)
{
return false;
}
@ -84,7 +84,7 @@ bool CRefIndex::save(const string& filename)
{
serial(oxml);
}
catch (Exception&)
catch (const Exception&)
{
return false;
}
@ -384,7 +384,7 @@ bool CDatabaseState::save(CRefIndex& ref)
{
serial(oxml);
}
catch (Exception&)
catch (const Exception&)
{
return false;
}
@ -422,7 +422,7 @@ bool CDatabaseState::load(const std::string& rootpath, bool usePrevious)
{
serial(ixml);
}
catch (Exception&)
catch (const Exception&)
{
return false;
}

View file

@ -709,7 +709,7 @@ bool CDbManager::init()
}
}
}
catch (Exception&)
catch (const Exception&)
{
}

View file

@ -1583,7 +1583,7 @@ bool CDatabase::buildDelta(const CTimestamp& starttime, const CTimestamp& endtim
// {
// logf.serialCont(_LogQueue);
// }
// catch (Exception& e)
// catch (const Exception& e)
// {
// PDS_WARNING("buildDelta(): exception occured while saving straight log : %s", e.what());
// }

View file

@ -897,7 +897,7 @@ void cbLSChooseShard (CMessage &msgin, const std::string &serviceName, TServiceI
{
msgin.serial (userPriv);
}
catch (Exception &)
catch (const Exception &)
{
nlwarning ("LS didn't give me the user privilege for user '%s', set to empty", userName.c_str());
}
@ -906,7 +906,7 @@ void cbLSChooseShard (CMessage &msgin, const std::string &serviceName, TServiceI
{
msgin.serial (userExtended);
}
catch (Exception &)
catch (const Exception &)
{
nlwarning ("LS didn't give me the extended data for user '%s', set to empty", userName.c_str());
}
@ -1154,7 +1154,7 @@ void updateShardOpenFromFile(const std::string& filename)
nlinfo("Updated ShardOpen state to '%u' from file '%s'", ShardOpen.get(), filename.c_str());
}
catch (Exception& e)
catch (const Exception& e)
{
nlwarning("Failed to update ShardOpen from file '%s', exception raised while getline() '%s'", filename.c_str(), e.what());
}

View file

@ -1278,7 +1278,7 @@ bool CExport::doExport (SExportOptions &opt, IExportCB *expCB, vector<SExportPri
loadLandscape (_LandFile);
}
catch (Exception &/*e*/)
catch (const Exception &/*e*/)
{
if (_ExportCB)
_ExportCB->dispError ("Cannot load banks files");
@ -1422,7 +1422,7 @@ bool CExport::generateIGFromFlora (const std::string &SrcFile, std::vector<SExpo
tmpPrimRegion.serial (input);
allPrimRegion.push_back (tmpPrimRegion);
}
catch (Exception &/*e*/)
catch (const Exception &/*e*/)
{
if (_ExportCB != NULL)
_ExportCB->dispWarning (string("Cant load ") + allPrimFiles[i]);
@ -1494,7 +1494,7 @@ bool CExport::generateIGFromFlora (const std::string &SrcFile, std::vector<SExpo
}
SetCurrentDirectory (sCurDir);
}
catch (Exception &e)
catch (const Exception &e)
{
SetCurrentDirectory (sCurDir);
if (_ExportCB != NULL)
@ -2078,7 +2078,7 @@ void CExport::writeFloraIG (const string &LandFile, bool bTestForWriting)
if (_ExportCB != NULL)
_ExportCB->dispInfo (ZoneName + " generated");
}
catch (Exception &e)
catch (const Exception &e)
{
if (_ExportCB != NULL)
_ExportCB->dispWarning ("Cant write " + ZoneName + " (" + e.what() + ")");
@ -2108,7 +2108,7 @@ void CExport::loadLandscape (const string &LandFile)
_ExportCB->dispWarning (string("Can't open file ") + LandFile);
}
}
catch (Exception &e)
catch (const Exception &e)
{
if (_ExportCB != NULL)
_ExportCB->dispWarning (string("Cant load ") + LandFile + " : " + e.what());

View file

@ -1094,7 +1094,7 @@ int main (int argc, char**argv)
nlwarning ("Error : can't open the file (%s) for writing.", igFilename.c_str ());
}
}
catch (Exception &e)
catch (const Exception &e)
{
// Error in the log
nlwarning ("Error writing the file (%s) : %s", igFilename.c_str (), e.what ());
@ -1121,7 +1121,7 @@ int main (int argc, char**argv)
}
}
}
catch (Exception &e)
catch (const Exception &e)
{
string sTmp = string("ERROR : ") + e.what();
outString (sTmp);

Some files were not shown because too many files have changed in this diff Show more