mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-22 23:06:18 +00:00
Changed: Exceptions catched by reference
This commit is contained in:
parent
5b5a050616
commit
cbc41fb73a
3 changed files with 16 additions and 16 deletions
|
@ -168,7 +168,7 @@ void impulseDatabaseInitPlayer(NLMISC::CBitMemStream &impulse)
|
|||
IngameDbMngr.setInitPacketReceived();
|
||||
nlinfo( "DB_INIT:PLR done (%u bytes)", impulse.getPos()-p );
|
||||
}
|
||||
catch (Exception &e)
|
||||
catch (const Exception &e)
|
||||
{
|
||||
BOMB( NLMISC::toString( "Problem while decoding a DB_INIT:PLR msg, skipped: %s", e.what() ), return );
|
||||
}
|
||||
|
@ -185,7 +185,7 @@ void impulseDatabaseUpdatePlayer(NLMISC::CBitMemStream &impulse)
|
|||
// read delta
|
||||
IngameDbMngr.readDelta( serverTick, impulse, CDBPlayer ); // unlike on the server, here there is only one unified CCDBSynchronized object
|
||||
}
|
||||
catch (Exception &e)
|
||||
catch (const Exception &e)
|
||||
{
|
||||
|
||||
BOMB( NLMISC::toString( "Problem while decoding a DB_UPDATE_PLR msg, skipped: %s", e.what() ), return );
|
||||
|
@ -218,7 +218,7 @@ void impulseDatabaseUpdateBank(NLMISC::CBitMemStream &impulse)
|
|||
updateInventoryFromStream( impulse, (INVENTORIES::CInventoryCategoryForGuild*)NULL, false );
|
||||
}
|
||||
}
|
||||
catch (Exception &e)
|
||||
catch (const Exception &e)
|
||||
{
|
||||
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:UPDATE_BANK %s msg, skipped: %s", CDBBankNames[bank], e.what() ), return );
|
||||
}
|
||||
|
@ -248,7 +248,7 @@ void impulseDatabaseInitBank(NLMISC::CBitMemStream &impulse)
|
|||
updateInventoryFromStream( impulse, (INVENTORIES::CInventoryCategoryForGuild*)NULL, false );
|
||||
}
|
||||
}
|
||||
catch (Exception &e)
|
||||
catch (const Exception &e)
|
||||
{
|
||||
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:INIT_BANK %s msg, skipped: %s", CDBBankNames[bank], e.what() ), return );
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ void impulseDatabaseResetBank(NLMISC::CBitMemStream &impulse)
|
|||
IngameDbMngr.getNodePtr()->resetBank( serverTick, (TCDBBank)bank );
|
||||
nldebug( "CDB: DB_GROUP:RESET_BANK %s", CDBBankNames[bank] );
|
||||
}
|
||||
catch (Exception &e)
|
||||
catch (const Exception &e)
|
||||
{
|
||||
BOMB( NLMISC::toString( "Problem while decoding a DB_GROUP:RESET_BANK %s msg, skipped: %s", CDBBankNames[bank], e.what() ), return );
|
||||
}
|
||||
|
@ -1568,7 +1568,7 @@ void impulseTPCommon2(NLMISC::CBitMemStream &impulse, bool hasSeason)
|
|||
}
|
||||
|
||||
}
|
||||
catch (EStream &)
|
||||
catch (const EStream &)
|
||||
{
|
||||
tpReason = ucstring("TP Reason");
|
||||
tpCancelText = ucstring("Cancel TP"); // for test
|
||||
|
@ -2236,7 +2236,7 @@ void impulseCounter(NLMISC::CBitMemStream &impulse)
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (Exception &e)
|
||||
catch (const Exception &e)
|
||||
{
|
||||
nlwarning ("Problem while decoding a COUTNER msg, skipped: %s", e.what());
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ CFightScriptComp *CFightSelectFilterReader::create (const std::string &inStr) th
|
|||
{
|
||||
scriptComp=createScriptComp(params[1]);
|
||||
}
|
||||
catch (ReadFightActionException &ex)
|
||||
catch (const ReadFightActionException &ex)
|
||||
{
|
||||
throw ReadFightActionException("cannot create sub ScriptComp : "+std::string(ex.what()));
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ public:
|
|||
{
|
||||
scriptComp=createScriptComp(params[0]);
|
||||
}
|
||||
catch (ReadFightActionException &ex)
|
||||
catch (const ReadFightActionException &ex)
|
||||
{
|
||||
throw ReadFightActionException("cannot create sub ScriptComp : "+string(ex.what()));
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ public:
|
|||
{
|
||||
scriptComp=createScriptComp(params[1]);
|
||||
}
|
||||
catch (ReadFightActionException &ex)
|
||||
catch (const ReadFightActionException &ex)
|
||||
{
|
||||
throw ReadFightActionException("cannot create sub ScriptComp : "+string(ex.what()));
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ public:
|
|||
{
|
||||
scriptComp=createScriptComp(params[1]);
|
||||
}
|
||||
catch (ReadFightActionException &ex)
|
||||
catch (const ReadFightActionException &ex)
|
||||
{
|
||||
throw ReadFightActionException("cannot create sub ScriptComp : "+string(ex.what()));
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ public:
|
|||
{
|
||||
scriptComp=createScriptComp(params[1]);
|
||||
}
|
||||
catch (ReadFightActionException &ex)
|
||||
catch (const ReadFightActionException &ex)
|
||||
{
|
||||
throw ReadFightActionException("cannot create sub ScriptComp : "+string(ex.what()));
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ public:
|
|||
{
|
||||
scriptComp=createScriptComp(params[1]);
|
||||
}
|
||||
catch (ReadFightActionException &ex)
|
||||
catch (const ReadFightActionException &ex)
|
||||
{
|
||||
throw ReadFightActionException("cannot create sub ScriptComp : "+string(ex.what()));
|
||||
}
|
||||
|
@ -1012,7 +1012,7 @@ public:
|
|||
for (uint32 i=0;i<nbSubScript;i++)
|
||||
scriptComps.push_back(createScriptComp(params[i]));
|
||||
}
|
||||
catch (ReadFightActionException &ex)
|
||||
catch (const ReadFightActionException &ex)
|
||||
{
|
||||
throw ReadFightActionException("cannot create sub ScriptComp : "+string(ex.what()));
|
||||
}
|
||||
|
@ -1085,7 +1085,7 @@ CFightScriptComp *CFightScriptCompReader::createScriptComp (const string &str) t
|
|||
{
|
||||
return getScriptReader (scriptCompName)->create(str);
|
||||
}
|
||||
catch (ReadFightActionException &e)
|
||||
catch (const ReadFightActionException &e)
|
||||
{
|
||||
throw ReadFightActionException(string("ScriptComp creation failed : ")+string(e.what()));
|
||||
}
|
||||
|
|
|
@ -1825,7 +1825,7 @@ bool execLoadScript(CStringWriter& stringWriter, vector<string> const& args)
|
|||
FOREACHC(itGrp, vector<CGroup*>, grps)
|
||||
(*itGrp)->getPersistentStateInstance()->interpretCode(NULL, codePtr);
|
||||
}
|
||||
catch (const EPathNotFound &e)
|
||||
catch (const EPathNotFound &)
|
||||
{
|
||||
nlwarning("Path not found while loading AIS script %s", args[2].c_str());
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue