From 5b5a050616e426ba29280840144a0dc511e698b4 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 3 Jun 2011 10:35:25 +0200 Subject: [PATCH] Changed: Exceptions catched by reference --- code/nel/include/nel/misc/config_file.h | 2 +- code/nel/include/nel/misc/i_xml.h | 2 +- code/nel/include/nel/misc/o_xml.h | 2 +- code/nel/samples/3d/cluster_viewer/main.cpp | 2 +- code/nel/samples/misc/configfile/main.cpp | 2 +- code/nel/samples/net/udp/bench_service.cpp | 6 ++-- code/nel/samples/pacs/main.cpp | 2 +- .../direct3d/driver_direct3d_inputs.cpp | 6 ++-- .../3d/driver/opengl/driver_opengl_inputs.cpp | 6 ++-- code/nel/src/3d/instance_group_user.cpp | 2 +- code/nel/src/3d/landscape_user.cpp | 2 +- code/nel/src/3d/shader.cpp | 2 +- code/nel/src/3d/vegetable_manager.cpp | 2 +- code/nel/src/3d/zone_lighter.cpp | 2 +- code/nel/src/georges/form_loader.cpp | 6 ++-- code/nel/src/ligo/ligo_config.cpp | 2 +- code/nel/src/ligo/zone_bank.cpp | 2 +- code/nel/src/misc/config_file/config_file.cpp | 2 +- code/nel/src/misc/debug.cpp | 4 +-- code/nel/src/misc/displayer.cpp | 2 +- code/nel/src/misc/file.cpp | 2 +- code/nel/src/net/callback_net_base.cpp | 2 +- code/nel/src/net/email.cpp | 2 +- code/nel/src/net/login_client.cpp | 8 +++--- code/nel/src/net/naming_client.cpp | 2 +- code/nel/src/net/service.cpp | 8 +++--- code/nel/src/net/unified_network.cpp | 10 +++---- code/nel/src/pacs/global_retriever.cpp | 2 +- code/nel/src/sound/audio_mixer_user.cpp | 6 ++-- .../driver/dsound/sound_driver_dsound.cpp | 2 +- code/nel/src/sound/sample_bank.cpp | 2 +- .../3d/build_far_bank/build_far_bank.cpp | 4 +-- .../3d/build_smallbank/build_smallbank.cpp | 2 +- code/nel/tools/3d/cluster_viewer/view_cs.cpp | 2 +- code/nel/tools/3d/ig_add/main.cpp | 4 +-- code/nel/tools/3d/ig_elevation/main.cpp | 12 ++++---- code/nel/tools/3d/ig_lighter/ig_lighter.cpp | 2 +- .../3d/shapes_exporter/shapes_exporter.cpp | 16 +++++------ code/nel/tools/3d/tga_resize/main.cpp | 2 +- .../zone_dependencies/zone_dependencies.cpp | 4 +-- code/nel/tools/3d/zone_dump/zone_dump.cpp | 2 +- .../3d/zone_ig_lighter/zone_ig_lighter.cpp | 6 ++-- .../tools/3d/zone_lighter/zone_lighter.cpp | 10 +++---- code/nel/tools/3d/zviewer/zviewer.cpp | 4 +-- code/nel/tools/nel_unit_test/ut_net_module.h | 2 +- code/nel/tools/pacs/build_ig_boxes/main.cpp | 4 +-- .../tools/pacs/build_indoor_rbank/main.cpp | 6 ++-- .../tools/pacs/build_rbank/build_rbank.cpp | 6 ++-- .../nel/tools/pacs/build_rbank/build_surf.cpp | 2 +- code/nel/tools/pacs/build_rbank/main.cpp | 4 +-- .../tools/pacs/build_rbank/prim_checker.cpp | 2 +- .../ryzom/client/src/bg_downloader_access.cpp | 2 +- code/ryzom/client/src/cdb_synchronised.cpp | 2 +- code/ryzom/client/src/client_cfg.cpp | 2 +- code/ryzom/client/src/commands.cpp | 2 +- code/ryzom/client/src/continent.cpp | 6 ++-- code/ryzom/client/src/init.cpp | 4 +-- .../interface_v3/input_handler_manager.cpp | 2 +- .../src/interface_v3/interface_manager.cpp | 4 +-- .../src/interface_v3/interface_parser.cpp | 2 +- .../client/src/interface_v3/lua_helper.cpp | 2 +- .../ryzom/client/src/interface_v3/lua_ihm.cpp | 10 +++---- code/ryzom/client/src/login_patch.cpp | 6 ++-- code/ryzom/client/src/main_loop.cpp | 4 +-- code/ryzom/client/src/network_connection.cpp | 14 +++++----- code/ryzom/client/src/prim_file.cpp | 2 +- code/ryzom/client/src/r2/editor.cpp | 2 +- code/ryzom/client/src/r2/island_collision.cpp | 2 +- code/ryzom/client/src/sound_manager.cpp | 4 +-- .../src/ai_service/nf_state_instance.cpp | 2 +- .../server/src/ai_service/script_compiler.cpp | 2 +- code/ryzom/server/src/ai_service/sheets.cpp | 4 +-- .../server/src/ai_service/world_container.cpp | 2 +- .../server/src/ai_share/primitive_parser.cpp | 4 +-- .../src/backup_service/web_connection.cpp | 4 +-- .../common_shard_callbacks.cpp | 2 +- .../entities_game_service.cpp | 6 ++-- .../guild_manager/guild_charge.cpp | 4 +-- .../guild_manager/guild_commands.cpp | 2 +- .../player_manager/player.cpp | 4 +-- .../player_manager/player_manager.cpp | 2 +- .../position_flag_manager.cpp | 2 +- .../shop_type/named_items.cpp | 2 +- .../gpm_service/world_position_manager.cpp | 4 +-- .../src/input_output_service/messages.cpp | 18 ++++++------ .../src/log_analyser_service/commands.cpp | 4 +-- .../log_analyser_service.cpp | 4 +-- .../server/src/logger_service/log_query.cpp | 2 +- .../src/logger_service/logger_service.cpp | 2 +- .../src/mail_forum_service/hof_generator.cpp | 2 +- .../ryzom/server/src/pd_lib/db_delta_file.cpp | 4 +-- .../src/pd_lib/db_description_parser.cpp | 2 +- .../server/src/pd_lib/db_reference_file.cpp | 6 ++-- code/ryzom/server/src/pd_lib/pd_lib.cpp | 2 +- .../server/src/pd_lib/pd_server_utils.cpp | 8 +++--- .../persistant_data_service/db_manager.cpp | 2 +- .../persistant_data_service/pds_database.cpp | 2 +- .../ryzom_welcome_service.cpp | 6 ++-- .../ryzom/tools/leveldesign/export/export.cpp | 10 +++---- .../tools/leveldesign/prim_export/main.cpp | 4 +-- .../world_editor/land_export/main.cpp | 10 +++---- .../world_editor/land_export_lib/export.cpp | 28 +++++++++---------- .../build_world_packed_col.cpp | 4 +-- .../server/build_world_packed_col/village.cpp | 2 +- .../extract_new_sheet_names.cpp | 2 +- 105 files changed, 221 insertions(+), 221 deletions(-) diff --git a/code/nel/include/nel/misc/config_file.h b/code/nel/include/nel/misc/config_file.h index eb7239b14..b1223fa14 100644 --- a/code/nel/include/nel/misc/config_file.h +++ b/code/nel/include/nel/misc/config_file.h @@ -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 ()); diff --git a/code/nel/include/nel/misc/i_xml.h b/code/nel/include/nel/misc/i_xml.h index e988375f7..7d2ff86b7 100644 --- a/code/nel/include/nel/misc/i_xml.h +++ b/code/nel/include/nel/misc/i_xml.h @@ -71,7 +71,7 @@ struct EXmlParsingError : public EStream // File not found } } - catch (Exception &e) + catch (const Exception &e) { // Something wrong appends } diff --git a/code/nel/include/nel/misc/o_xml.h b/code/nel/include/nel/misc/o_xml.h index af4e830ff..bbaa2e951 100644 --- a/code/nel/include/nel/misc/o_xml.h +++ b/code/nel/include/nel/misc/o_xml.h @@ -64,7 +64,7 @@ namespace NLMISC { // Close the file file.close (); } - catch (Exception &e) + catch (const Exception &e) { } \endcode diff --git a/code/nel/samples/3d/cluster_viewer/main.cpp b/code/nel/samples/3d/cluster_viewer/main.cpp index bc314e43a..b77a0d669 100644 --- a/code/nel/samples/3d/cluster_viewer/main.cpp +++ b/code/nel/samples/3d/cluster_viewer/main.cpp @@ -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; diff --git a/code/nel/samples/misc/configfile/main.cpp b/code/nel/samples/misc/configfile/main.cpp index f5a3fd472..c23acd652 100644 --- a/code/nel/samples/misc/configfile/main.cpp +++ b/code/nel/samples/misc/configfile/main.cpp @@ -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()); } diff --git a/code/nel/samples/net/udp/bench_service.cpp b/code/nel/samples/net/udp/bench_service.cpp index 0b8db1a71..7b0789fc6 100644 --- a/code/nel/samples/net/udp/bench_service.cpp +++ b/code/nel/samples/net/udp/bench_service.cpp @@ -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()); } diff --git a/code/nel/samples/pacs/main.cpp b/code/nel/samples/pacs/main.cpp index d3d87a938..fcbd7d8a9 100644 --- a/code/nel/samples/pacs/main.cpp +++ b/code/nel/samples/pacs/main.cpp @@ -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); diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp index e64585ad7..eaae085f9 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_inputs.cpp @@ -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 .. } diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp index b957b372a..acfdac253 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp @@ -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 .. } diff --git a/code/nel/src/3d/instance_group_user.cpp b/code/nel/src/3d/instance_group_user.cpp index 3e79f3c15..722d867da 100644 --- a/code/nel/src/3d/instance_group_user.cpp +++ b/code/nel/src/3d/instance_group_user.cpp @@ -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; diff --git a/code/nel/src/3d/landscape_user.cpp b/code/nel/src/3d/landscape_user.cpp index c088dcdb4..ed646470a 100644 --- a/code/nel/src/3d/landscape_user.cpp +++ b/code/nel/src/3d/landscape_user.cpp @@ -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!")); diff --git a/code/nel/src/3d/shader.cpp b/code/nel/src/3d/shader.cpp index 1872b8a4f..deddce762 100644 --- a/code/nel/src/3d/shader.cpp +++ b/code/nel/src/3d/shader.cpp @@ -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()); } diff --git a/code/nel/src/3d/vegetable_manager.cpp b/code/nel/src/3d/vegetable_manager.cpp index bb472e75a..a51e5c83e 100644 --- a/code/nel/src/3d/vegetable_manager.cpp +++ b/code/nel/src/3d/vegetable_manager.cpp @@ -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 ()); diff --git a/code/nel/src/3d/zone_lighter.cpp b/code/nel/src/3d/zone_lighter.cpp index 80026db12..980a83278 100644 --- a/code/nel/src/3d/zone_lighter.cpp +++ b/code/nel/src/3d/zone_lighter.cpp @@ -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()); diff --git a/code/nel/src/georges/form_loader.cpp b/code/nel/src/georges/form_loader.cpp index e3098709f..b7d4a522e 100644 --- a/code/nel/src/georges/form_loader.cpp +++ b/code/nel/src/georges/form_loader.cpp @@ -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()); diff --git a/code/nel/src/ligo/ligo_config.cpp b/code/nel/src/ligo/ligo_config.cpp index c61b03d03..1d062d109 100644 --- a/code/nel/src/ligo/ligo_config.cpp +++ b/code/nel/src/ligo/ligo_config.cpp @@ -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 ()); } diff --git a/code/nel/src/ligo/zone_bank.cpp b/code/nel/src/ligo/zone_bank.cpp index 52b07ab71..28f30db4b 100644 --- a/code/nel/src/ligo/zone_bank.cpp +++ b/code/nel/src/ligo/zone_bank.cpp @@ -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*/) { } diff --git a/code/nel/src/misc/config_file/config_file.cpp b/code/nel/src/misc/config_file/config_file.cpp index f85469003..ebbce4867 100644 --- a/code/nel/src/misc/config_file/config_file.cpp +++ b/code/nel/src/misc/config_file/config_file.cpp @@ -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 ()); } diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index 17cf2fd3b..b6fc1d85c 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -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(); // } diff --git a/code/nel/src/misc/displayer.cpp b/code/nel/src/misc/displayer.cpp index cc072fd20..c50935b8f 100644 --- a/code/nel/src/misc/displayer.cpp +++ b/code/nel/src/misc/displayer.cpp @@ -120,7 +120,7 @@ void IDisplayer::display ( const CLog::TDisplayInfo& args, const char *message ) { doDisplay( args, message ); } - catch (Exception &) + catch (const Exception &) { // silence } diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index 515c49014..eb1fa643a 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -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; diff --git a/code/nel/src/net/callback_net_base.cpp b/code/nel/src/net/callback_net_base.cpp index 8620a75b3..24c2b9038 100644 --- a/code/nel/src/net/callback_net_base.cpp +++ b/code/nel/src/net/callback_net_base.cpp @@ -155,7 +155,7 @@ void CCallbackNetBase::processOneMessage () { receive (msgin, &tsid); } - catch (Exception &e) + catch (const Exception &e) { nlwarning(e.what()); return; diff --git a/code/nel/src/net/email.cpp b/code/nel/src/net/email.cpp index 313405983..efafe3e90 100644 --- a/code/nel/src/net/email.cpp +++ b/code/nel/src/net/email.cpp @@ -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; diff --git a/code/nel/src/net/login_client.cpp b/code/nel/src/net/login_client.cpp index 550b620ee..9c34b41a3 100644 --- a/code/nel/src/net/login_client.cpp +++ b/code/nel/src/net/login_client.cpp @@ -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 () + ")"; } diff --git a/code/nel/src/net/naming_client.cpp b/code/nel/src/net/naming_client.cpp index 5c735cf97..4aac61ea1 100644 --- a/code/nel/src/net/naming_client.cpp +++ b/code/nel/src/net/naming_client.cpp @@ -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() ); diff --git a/code/nel/src/net/service.cpp b/code/nel/src/net/service.cpp index 64a2fdf1c..8ed4c10c9 100644 --- a/code/nel/src/net/service.cpp +++ b/code/nel/src/net/service.cpp @@ -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 diff --git a/code/nel/src/net/unified_network.cpp b/code/nel/src/net/unified_network.cpp index 8a1a87b85..d3b0d16fe 100644 --- a/code/nel/src/net/unified_network.cpp +++ b/code/nel/src/net/unified_network.cpp @@ -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 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 ()); diff --git a/code/nel/src/pacs/global_retriever.cpp b/code/nel/src/pacs/global_retriever.cpp index c9ab8cd0c..936846dd2 100644 --- a/code/nel/src/pacs/global_retriever.cpp +++ b/code/nel/src/pacs/global_retriever.cpp @@ -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()); diff --git a/code/nel/src/sound/audio_mixer_user.cpp b/code/nel/src/sound/audio_mixer_user.cpp index 45372dde2..367abd0e1 100644 --- a/code/nel/src/sound/audio_mixer_user.cpp +++ b/code/nel/src/sound/audio_mixer_user.cpp @@ -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) { diff --git a/code/nel/src/sound/driver/dsound/sound_driver_dsound.cpp b/code/nel/src/sound/driver/dsound/sound_driver_dsound.cpp index 62efc1510..15d0d708f 100644 --- a/code/nel/src/sound/driver/dsound/sound_driver_dsound.cpp +++ b/code/nel/src/sound/driver/dsound/sound_driver_dsound.cpp @@ -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 diff --git a/code/nel/src/sound/sample_bank.cpp b/code/nel/src/sound/sample_bank.cpp index a9f3c8e9e..8dd764f54 100644 --- a/code/nel/src/sound/sample_bank.cpp +++ b/code/nel/src/sound/sample_bank.cpp @@ -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; diff --git a/code/nel/tools/3d/build_far_bank/build_far_bank.cpp b/code/nel/tools/3d/build_far_bank/build_far_bank.cpp index be8b48e0e..db49575a7 100644 --- a/code/nel/tools/3d/build_far_bank/build_far_bank.cpp +++ b/code/nel/tools/3d/build_far_bank/build_far_bank.cpp @@ -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()); } diff --git a/code/nel/tools/3d/build_smallbank/build_smallbank.cpp b/code/nel/tools/3d/build_smallbank/build_smallbank.cpp index 45e995427..888799579 100644 --- a/code/nel/tools/3d/build_smallbank/build_smallbank.cpp +++ b/code/nel/tools/3d/build_smallbank/build_smallbank.cpp @@ -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()); diff --git a/code/nel/tools/3d/cluster_viewer/view_cs.cpp b/code/nel/tools/3d/cluster_viewer/view_cs.cpp index bed6a7518..6e19af2f0 100644 --- a/code/nel/tools/3d/cluster_viewer/view_cs.cpp +++ b/code/nel/tools/3d/cluster_viewer/view_cs.cpp @@ -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; diff --git a/code/nel/tools/3d/ig_add/main.cpp b/code/nel/tools/3d/ig_add/main.cpp index 5890a38a5..f32d0c87a 100644 --- a/code/nel/tools/3d/ig_add/main.cpp +++ b/code/nel/tools/3d/ig_add/main.cpp @@ -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; } diff --git a/code/nel/tools/3d/ig_elevation/main.cpp b/code/nel/tools/3d/ig_elevation/main.cpp index f0044b651..988cde08e 100644 --- a/code/nel/tools/3d/ig_elevation/main.cpp +++ b/code/nel/tools/3d/ig_elevation/main.cpp @@ -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); diff --git a/code/nel/tools/3d/ig_lighter/ig_lighter.cpp b/code/nel/tools/3d/ig_lighter/ig_lighter.cpp index f1c30fc20..2a6508399 100644 --- a/code/nel/tools/3d/ig_lighter/ig_lighter.cpp +++ b/code/nel/tools/3d/ig_lighter/ig_lighter.cpp @@ -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()); diff --git a/code/nel/tools/3d/shapes_exporter/shapes_exporter.cpp b/code/nel/tools/3d/shapes_exporter/shapes_exporter.cpp index c61bc42a0..ad8e8ec3f 100644 --- a/code/nel/tools/3d/shapes_exporter/shapes_exporter.cpp +++ b/code/nel/tools/3d/shapes_exporter/shapes_exporter.cpp @@ -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); } diff --git a/code/nel/tools/3d/tga_resize/main.cpp b/code/nel/tools/3d/tga_resize/main.cpp index f6ad4ea18..ff3970664 100644 --- a/code/nel/tools/3d/tga_resize/main.cpp +++ b/code/nel/tools/3d/tga_resize/main.cpp @@ -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; diff --git a/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp b/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp index 7fcc7d0bd..bb143e20b 100644 --- a/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp +++ b/code/nel/tools/3d/zone_dependencies/zone_dependencies.cpp @@ -385,7 +385,7 @@ int main (int argc, char* argv[]) if (newZTileBank.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()); diff --git a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp index 465f72155..d00db9438 100644 --- a/code/nel/tools/3d/zone_lighter/zone_lighter.cpp +++ b/code/nel/tools/3d/zone_lighter/zone_lighter.cpp @@ -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()); diff --git a/code/nel/tools/3d/zviewer/zviewer.cpp b/code/nel/tools/3d/zviewer/zviewer.cpp index d573d8f82..3b2dca06a 100644 --- a/code/nel/tools/3d/zviewer/zviewer.cpp +++ b/code/nel/tools/3d/zviewer/zviewer.cpp @@ -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 ()); } diff --git a/code/nel/tools/nel_unit_test/ut_net_module.h b/code/nel/tools/nel_unit_test/ut_net_module.h index 871901f8d..15d526075 100644 --- a/code/nel/tools/nel_unit_test/ut_net_module.h +++ b/code/nel/tools/nel_unit_test/ut_net_module.h @@ -193,7 +193,7 @@ public: { invokeModuleOperation(proxy, msg, resp); } - catch(IModule::EInvokeFailed) + catch(const IModule::EInvokeFailed &) { ResponseReceived++; } diff --git a/code/nel/tools/pacs/build_ig_boxes/main.cpp b/code/nel/tools/pacs/build_ig_boxes/main.cpp index 046e5ee74..7e917d85e 100644 --- a/code/nel/tools/pacs/build_ig_boxes/main.cpp +++ b/code/nel/tools/pacs/build_ig_boxes/main.cpp @@ -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 ()); } diff --git a/code/nel/tools/pacs/build_indoor_rbank/main.cpp b/code/nel/tools/pacs/build_indoor_rbank/main.cpp index 1d459e2ee..b432f372a 100644 --- a/code/nel/tools/pacs/build_indoor_rbank/main.cpp +++ b/code/nel/tools/pacs/build_indoor_rbank/main.cpp @@ -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 &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 &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()); } diff --git a/code/nel/tools/pacs/build_rbank/build_rbank.cpp b/code/nel/tools/pacs/build_rbank/build_rbank.cpp index caca058e9..295409508 100644 --- a/code/nel/tools/pacs/build_rbank/build_rbank.cpp +++ b/code/nel/tools/pacs/build_rbank/build_rbank.cpp @@ -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; iasString(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 ()); } diff --git a/code/nel/tools/pacs/build_rbank/prim_checker.cpp b/code/nel/tools/pacs/build_rbank/prim_checker.cpp index 678972f91..5273db1da 100644 --- a/code/nel/tools/pacs/build_rbank/prim_checker.cpp +++ b/code/nel/tools/pacs/build_rbank/prim_checker.cpp @@ -171,7 +171,7 @@ bool CPrimChecker::build(const string &primitivesPath, const string &igLandPath, } } } - catch (Exception &e) + catch (const Exception &e) { nlwarning("%s", e.what()); } diff --git a/code/ryzom/client/src/bg_downloader_access.cpp b/code/ryzom/client/src/bg_downloader_access.cpp index 5ec3a3512..699f01f3a 100644 --- a/code/ryzom/client/src/bg_downloader_access.cpp +++ b/code/ryzom/client/src/bg_downloader_access.cpp @@ -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 } diff --git a/code/ryzom/client/src/cdb_synchronised.cpp b/code/ryzom/client/src/cdb_synchronised.cpp index a9fcd1b58..21b1f1748 100644 --- a/code/ryzom/client/src/cdb_synchronised.cpp +++ b/code/ryzom/client/src/cdb_synchronised.cpp @@ -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()); diff --git a/code/ryzom/client/src/client_cfg.cpp b/code/ryzom/client/src/client_cfg.cpp index 94900e123..9b60a4c5f 100644 --- a/code/ryzom/client/src/client_cfg.cpp +++ b/code/ryzom/client/src/client_cfg.cpp @@ -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 ()); } diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index 305a87389..877f80429 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -1096,7 +1096,7 @@ NLMISC_COMMAND(execScript, "Execute a script file (.cmd)","") // read one byte iFile.serialBuffer ((uint8 *)buffer, 1); } - catch (EFile &) + catch (const EFile &) { *buffer = '\0'; eof = true; diff --git a/code/ryzom/client/src/continent.cpp b/code/ryzom/client/src/continent.cpp index 3759c5da7..eb5a4dbe6 100644 --- a/code/ryzom/client/src/continent.cpp +++ b/code/ryzom/client/src/continent.cpp @@ -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()); } diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 37dd66e6e..55d09c69e 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -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()); } diff --git a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp index 1d755dd56..3ece9f125 100644 --- a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp +++ b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp @@ -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; diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 3e846d545..c4e238141 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -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()); diff --git a/code/ryzom/client/src/interface_v3/interface_parser.cpp b/code/ryzom/client/src/interface_v3/interface_parser.cpp index 694638ab4..56b95be88 100644 --- a/code/ryzom/client/src/interface_v3/interface_parser.cpp +++ b/code/ryzom/client/src/interface_v3/interface_parser.cpp @@ -685,7 +685,7 @@ bool CInterfaceParser::parseInterface (const std::vector & strings, i++; } } - catch (Exception &e) + catch (const Exception &e) { // Output error // todo hulud interface syntax error diff --git a/code/ryzom/client/src/interface_v3/lua_helper.cpp b/code/ryzom/client/src/interface_v3/lua_helper.cpp index 0ec99d5a4..9fa942d41 100644 --- a/code/ryzom/client/src/interface_v3/lua_helper.cpp +++ b/code/ryzom/client/src/interface_v3/lua_helper.cpp @@ -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; diff --git a/code/ryzom/client/src/interface_v3/lua_ihm.cpp b/code/ryzom/client/src/interface_v3/lua_ihm.cpp index cf34912f8..15dd9872a 100644 --- a/code/ryzom/client/src/interface_v3/lua_ihm.cpp +++ b/code/ryzom/client/src/interface_v3/lua_ihm.cpp @@ -233,7 +233,7 @@ bool CLuaIHM::pop(CLuaState &ls, NLMISC::CRGBA &dest) #endif dest = luabind::object_cast(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(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(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(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(obj); } - catch(luabind::cast_failed &) + catch(const luabind::cast_failed &) { return false; } diff --git a/code/ryzom/client/src/login_patch.cpp b/code/ryzom/client/src/login_patch.cpp index ec641c7ef..2454b231c 100644 --- a/code/ryzom/client/src/login_patch.cpp +++ b/code/ryzom/client/src/login_patch.cpp @@ -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(); diff --git a/code/ryzom/client/src/main_loop.cpp b/code/ryzom/client/src/main_loop.cpp index d1c54c6c0..81a63ae60 100644 --- a/code/ryzom/client/src/main_loop.cpp +++ b/code/ryzom/client/src/main_loop.cpp @@ -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"); } diff --git a/code/ryzom/client/src/network_connection.cpp b/code/ryzom/client/src/network_connection.cpp index 2a1de9a9e..f633126e5 100644 --- a/code/ryzom/client/src/network_connection.cpp +++ b/code/ryzom/client/src/network_connection.cpp @@ -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; } diff --git a/code/ryzom/client/src/prim_file.cpp b/code/ryzom/client/src/prim_file.cpp index c9839956e..e1959aabd 100644 --- a/code/ryzom/client/src/prim_file.cpp +++ b/code/ryzom/client/src/prim_file.cpp @@ -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 ()); diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index fd6d99132..0de8bc626 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -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()); } diff --git a/code/ryzom/client/src/r2/island_collision.cpp b/code/ryzom/client/src/r2/island_collision.cpp index 5d6558d8d..b096a4255 100644 --- a/code/ryzom/client/src/r2/island_collision.cpp +++ b/code/ryzom/client/src/r2/island_collision.cpp @@ -419,7 +419,7 @@ CPackedWorld *CIslandCollision::reloadPackedIsland(const CScenarioEntryPoints::C _PackedIslandName = islandDesc.Island; _IslandDesc = islandDesc; } - catch (Exception &) + catch (const Exception &) { _PackedIslandLoadingFailure = true; } diff --git a/code/ryzom/client/src/sound_manager.cpp b/code/ryzom/client/src/sound_manager.cpp index 65ae0a30a..fb4b3708f 100644 --- a/code/ryzom/client/src/sound_manager.cpp +++ b/code/ryzom/client/src/sound_manager.cpp @@ -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 ()); } diff --git a/code/ryzom/server/src/ai_service/nf_state_instance.cpp b/code/ryzom/server/src/ai_service/nf_state_instance.cpp index e19e6c890..ab9a7a11f 100644 --- a/code/ryzom/server/src/ai_service/nf_state_instance.cpp +++ b/code/ryzom/server/src/ai_service/nf_state_instance.cpp @@ -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()); } diff --git a/code/ryzom/server/src/ai_service/script_compiler.cpp b/code/ryzom/server/src/ai_service/script_compiler.cpp index 5194ca30f..aabe5889c 100644 --- a/code/ryzom/server/src/ai_service/script_compiler.cpp +++ b/code/ryzom/server/src/ai_service/script_compiler.cpp @@ -1192,7 +1192,7 @@ CSmartPtr 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()); diff --git a/code/ryzom/server/src/ai_service/sheets.cpp b/code/ryzom/server/src/ai_service/sheets.cpp index 5b417b83f..2b5ff6f6b 100644 --- a/code/ryzom/server/src/ai_service/sheets.cpp +++ b/code/ryzom/server/src/ai_service/sheets.cpp @@ -632,7 +632,7 @@ void AISHEETS::CCreature::readGeorges(NLMISC::CSmartPtr 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()); } diff --git a/code/ryzom/server/src/ai_service/world_container.cpp b/code/ryzom/server/src/ai_service/world_container.cpp index 9a7384e95..06a4296b7 100644 --- a/code/ryzom/server/src/ai_service/world_container.cpp +++ b/code/ryzom/server/src/ai_service/world_container.cpp @@ -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()); } diff --git a/code/ryzom/server/src/ai_share/primitive_parser.cpp b/code/ryzom/server/src/ai_share/primitive_parser.cpp index 60fc6d04a..bf76fba5c 100644 --- a/code/ryzom/server/src/ai_share/primitive_parser.cpp +++ b/code/ryzom/server/src/ai_share/primitive_parser.cpp @@ -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()); } diff --git a/code/ryzom/server/src/backup_service/web_connection.cpp b/code/ryzom/server/src/backup_service/web_connection.cpp index d7d2c0b7c..a8ab4dce0 100644 --- a/code/ryzom/server/src/backup_service/web_connection.cpp +++ b/code/ryzom/server/src/backup_service/web_connection.cpp @@ -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 ()); } diff --git a/code/ryzom/server/src/entities_game_service/common_shard_callbacks.cpp b/code/ryzom/server/src/entities_game_service/common_shard_callbacks.cpp index 4f9c1a4d3..898fef12c 100644 --- a/code/ryzom/server/src/entities_game_service/common_shard_callbacks.cpp +++ b/code/ryzom/server/src/entities_game_service/common_shard_callbacks.cpp @@ -97,7 +97,7 @@ void cbStallMode( NLNET::CMessage& msgin, const std::string &serviceName, NLNET: CUnifiedNetwork::getInstance()->send("TICKS", msgout); } } - catch (Exception&) + catch (const Exception&) { } diff --git a/code/ryzom/server/src/entities_game_service/entities_game_service.cpp b/code/ryzom/server/src/entities_game_service/entities_game_service.cpp index 3d43a6012..8139713ef 100644 --- a/code/ryzom/server/src/entities_game_service/entities_game_service.cpp +++ b/code/ryzom/server/src/entities_game_service/entities_game_service.cpp @@ -584,7 +584,7 @@ bool loadAndResaveCheckCharacters( const std::vector& 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","_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; } diff --git a/code/ryzom/server/src/entities_game_service/guild_manager/guild_charge.cpp b/code/ryzom/server/src/entities_game_service/guild_manager/guild_charge.cpp index 89f216681..e16391eea 100644 --- a/code/ryzom/server/src/entities_game_service/guild_manager/guild_charge.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_manager/guild_charge.cpp @@ -90,7 +90,7 @@ bool CGuildCharge::build( NLMISC::TStringId civ, const std::vector return true; } } - catch (Exception & e) + catch (const Exception & e) { nlwarning(" 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(" file %s exception '%s'",_FileName.c_str(),e.what()); } diff --git a/code/ryzom/server/src/entities_game_service/guild_manager/guild_commands.cpp b/code/ryzom/server/src/entities_game_service/guild_manager/guild_commands.cpp index 62a447ffb..99c0dfb03 100644 --- a/code/ryzom/server/src/entities_game_service/guild_manager/guild_commands.cpp +++ b/code/ryzom/server/src/entities_game_service/guild_manager/guild_commands.cpp @@ -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() ); } diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player.cpp b/code/ryzom/server/src/entities_game_service/player_manager/player.cpp index 48d7606a4..708f03a20 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/player.cpp @@ -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(); } diff --git a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.cpp b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.cpp index 99b1d63a7..36d2022e4 100644 --- a/code/ryzom/server/src/entities_game_service/player_manager/player_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/player_manager/player_manager.cpp @@ -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()); // } diff --git a/code/ryzom/server/src/entities_game_service/position_flag_manager.cpp b/code/ryzom/server/src/entities_game_service/position_flag_manager.cpp index 738bb260f..314831d0c 100644 --- a/code/ryzom/server/src/entities_game_service/position_flag_manager.cpp +++ b/code/ryzom/server/src/entities_game_service/position_flag_manager.cpp @@ -105,7 +105,7 @@ void CPositionFlagManager::serial(NLMISC::IStream & f) throw(NLMISC::EStream) f.xmlPushEnd(); f.xmlPop(); } - catch (EStream &) + catch (const EStream &) { BOMB(" invalid size or invalid flag", break); } diff --git a/code/ryzom/server/src/entities_game_service/shop_type/named_items.cpp b/code/ryzom/server/src/entities_game_service/shop_type/named_items.cpp index ae94377f7..b7a6b76a1 100644 --- a/code/ryzom/server/src/entities_game_service/shop_type/named_items.cpp +++ b/code/ryzom/server/src/entities_game_service/shop_type/named_items.cpp @@ -60,7 +60,7 @@ void CNamedItems::loadNamedItemsFromFile(const std::string & fileName) { path = CPath::lookup(fileName); } - catch (Exception &) + catch (const Exception &) { nlwarning(" file '%s' was not found", fileName.c_str()); return; diff --git a/code/ryzom/server/src/gpm_service/world_position_manager.cpp b/code/ryzom/server/src/gpm_service/world_position_manager.cpp index 4ae2815d4..5ccab7973 100644 --- a/code/ryzom/server/src/gpm_service/world_position_manager.cpp +++ b/code/ryzom/server/src/gpm_service/world_position_manager.cpp @@ -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()); } diff --git a/code/ryzom/server/src/input_output_service/messages.cpp b/code/ryzom/server/src/input_output_service/messages.cpp index 5c314f4a8..df8eff255 100644 --- a/code/ryzom/server/src/input_output_service/messages.cpp +++ b/code/ryzom/server/src/input_output_service/messages.cpp @@ -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(" exception, ignoring emote"); } diff --git a/code/ryzom/server/src/log_analyser_service/commands.cpp b/code/ryzom/server/src/log_analyser_service/commands.cpp index 7fb97c6c4..fcdde0c97 100644 --- a/code/ryzom/server/src/log_analyser_service/commands.cpp +++ b/code/ryzom/server/src/log_analyser_service/commands.cpp @@ -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; diff --git a/code/ryzom/server/src/log_analyser_service/log_analyser_service.cpp b/code/ryzom/server/src/log_analyser_service/log_analyser_service.cpp index 2c8e50058..5eb11b315 100644 --- a/code/ryzom/server/src/log_analyser_service/log_analyser_service.cpp +++ b/code/ryzom/server/src/log_analyser_service/log_analyser_service.cpp @@ -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 ()); } diff --git a/code/ryzom/server/src/logger_service/log_query.cpp b/code/ryzom/server/src/logger_service/log_query.cpp index 42e292795..2480fdac3 100644 --- a/code/ryzom/server/src/logger_service/log_query.cpp +++ b/code/ryzom/server/src/logger_service/log_query.cpp @@ -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); diff --git a/code/ryzom/server/src/logger_service/logger_service.cpp b/code/ryzom/server/src/logger_service/logger_service.cpp index 5e09ccb83..bef579942 100644 --- a/code/ryzom/server/src/logger_service/logger_service.cpp +++ b/code/ryzom/server/src/logger_service/logger_service.cpp @@ -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))); diff --git a/code/ryzom/server/src/mail_forum_service/hof_generator.cpp b/code/ryzom/server/src/mail_forum_service/hof_generator.cpp index aa0d673b5..084dc5009 100644 --- a/code/ryzom/server/src/mail_forum_service/hof_generator.cpp +++ b/code/ryzom/server/src/mail_forum_service/hof_generator.cpp @@ -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; diff --git a/code/ryzom/server/src/pd_lib/db_delta_file.cpp b/code/ryzom/server/src/pd_lib/db_delta_file.cpp index a413c228d..756fa05d4 100644 --- a/code/ryzom/server/src/pd_lib/db_delta_file.cpp +++ b/code/ryzom/server/src/pd_lib/db_delta_file.cpp @@ -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; diff --git a/code/ryzom/server/src/pd_lib/db_description_parser.cpp b/code/ryzom/server/src/pd_lib/db_description_parser.cpp index 6b9830e96..34ea8bb45 100644 --- a/code/ryzom/server/src/pd_lib/db_description_parser.cpp +++ b/code/ryzom/server/src/pd_lib/db_description_parser.cpp @@ -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; diff --git a/code/ryzom/server/src/pd_lib/db_reference_file.cpp b/code/ryzom/server/src/pd_lib/db_reference_file.cpp index 2f787f6b2..fe86800f9 100644 --- a/code/ryzom/server/src/pd_lib/db_reference_file.cpp +++ b/code/ryzom/server/src/pd_lib/db_reference_file.cpp @@ -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; diff --git a/code/ryzom/server/src/pd_lib/pd_lib.cpp b/code/ryzom/server/src/pd_lib/pd_lib.cpp index a25bffac1..bb454e75d 100644 --- a/code/ryzom/server/src/pd_lib/pd_lib.cpp +++ b/code/ryzom/server/src/pd_lib/pd_lib.cpp @@ -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; diff --git a/code/ryzom/server/src/pd_lib/pd_server_utils.cpp b/code/ryzom/server/src/pd_lib/pd_server_utils.cpp index 56c9d22e2..6bb6157c3 100644 --- a/code/ryzom/server/src/pd_lib/pd_server_utils.cpp +++ b/code/ryzom/server/src/pd_lib/pd_server_utils.cpp @@ -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; } diff --git a/code/ryzom/server/src/persistant_data_service/db_manager.cpp b/code/ryzom/server/src/persistant_data_service/db_manager.cpp index efe5fe2d4..55f184ac5 100644 --- a/code/ryzom/server/src/persistant_data_service/db_manager.cpp +++ b/code/ryzom/server/src/persistant_data_service/db_manager.cpp @@ -709,7 +709,7 @@ bool CDbManager::init() } } } - catch (Exception&) + catch (const Exception&) { } diff --git a/code/ryzom/server/src/persistant_data_service/pds_database.cpp b/code/ryzom/server/src/persistant_data_service/pds_database.cpp index e87e91261..4b3e903ac 100644 --- a/code/ryzom/server/src/persistant_data_service/pds_database.cpp +++ b/code/ryzom/server/src/persistant_data_service/pds_database.cpp @@ -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()); // } diff --git a/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp b/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp index e7854d8ce..38aca6b76 100644 --- a/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp +++ b/code/ryzom/server/src/ryzom_welcome_service/ryzom_welcome_service.cpp @@ -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()); } diff --git a/code/ryzom/tools/leveldesign/export/export.cpp b/code/ryzom/tools/leveldesign/export/export.cpp index 28e32db23..f02a659c1 100644 --- a/code/ryzom/tools/leveldesign/export/export.cpp +++ b/code/ryzom/tools/leveldesign/export/export.cpp @@ -1278,7 +1278,7 @@ bool CExport::doExport (SExportOptions &opt, IExportCB *expCB, vectordispError ("Cannot load banks files"); @@ -1422,7 +1422,7 @@ bool CExport::generateIGFromFlora (const std::string &SrcFile, std::vectordispWarning (string("Cant load ") + allPrimFiles[i]); @@ -1494,7 +1494,7 @@ bool CExport::generateIGFromFlora (const std::string &SrcFile, std::vectordispInfo (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()); diff --git a/code/ryzom/tools/leveldesign/prim_export/main.cpp b/code/ryzom/tools/leveldesign/prim_export/main.cpp index 0dbf9da1a..2a1a4c600 100644 --- a/code/ryzom/tools/leveldesign/prim_export/main.cpp +++ b/code/ryzom/tools/leveldesign/prim_export/main.cpp @@ -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); diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp b/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp index 83c93f311..ab734e969 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/land_export/main.cpp @@ -112,7 +112,7 @@ struct SOptions : public SExportOptions CConfigFile::CVar &cvString = cf.getVar (var); ret = cvString.asString (); } - catch (EConfigFile &/*e*/) + catch (const EConfigFile &/*e*/) { outString (string("WARNING : variable not found : ") + var + " in " + FileName + "\n"); } @@ -127,7 +127,7 @@ struct SOptions : public SExportOptions CConfigFile::CVar &cvString = cf.getVar (var); ret = cvString.asFloat (); } - catch (EConfigFile &/*e*/) + catch (const EConfigFile &/*e*/) { outString (string("WARNING : variable not found : ") + var + " in " + FileName + "\n"); } @@ -142,7 +142,7 @@ struct SOptions : public SExportOptions CConfigFile::CVar &cvString = cf.getVar (var); ret = cvString.asInt (); } - catch (EConfigFile &/*e*/) + catch (const EConfigFile &/*e*/) { outString (string("WARNING : variable not found : ") + var + " in " + FileName + "\n"); } @@ -187,7 +187,7 @@ struct SOptions : public SExportOptions this->DFNDir = getStr("DFNDir"); this->ContinentsDir = getStr("ContinentsDir"); } - catch (EConfigFile &e) + catch (const EConfigFile &e) { string sTmp = string("ERROR : Error in config file : ") + e.what() + "\n"; outString (sTmp); @@ -215,7 +215,7 @@ struct SOptions : public SExportOptions return false; } } - catch (Exception& e) + catch (const Exception& e) { string sTmp = string("Error in land file : ") + e.what(); outString (sTmp); diff --git a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp index 0f02075c2..00396226b 100644 --- a/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/land_export_lib/export.cpp @@ -194,7 +194,7 @@ bool CExport::export_ (SExportOptions &options, IExportCB *expCB) CIFile inFile (_Options->TileBankFile); _ZeTileBank->serial (inFile); } - catch (Exception &) + catch (const Exception &) { if (_ExportCB != NULL) _ExportCB->dispError (string("Cant load tile bank : ") + _Options->TileBankFile); @@ -223,7 +223,7 @@ bool CExport::export_ (SExportOptions &options, IExportCB *expCB) _HeightMap = NULL; } } - catch (Exception &) + catch (const Exception &) { if (_ExportCB != NULL) _ExportCB->dispWarning (string("Cant load height map : ") + _Options->HeightMapFile); @@ -254,7 +254,7 @@ bool CExport::export_ (SExportOptions &options, IExportCB *expCB) _HeightMap2 = NULL; } } - catch (Exception &) + catch (const Exception &) { if (_ExportCB != NULL) _ExportCB->dispWarning (string("ERROR: Cant load height map : ") + _Options->HeightMapFile2); @@ -285,7 +285,7 @@ bool CExport::export_ (SExportOptions &options, IExportCB *expCB) _ColorMap = NULL; } } - catch (Exception &) + catch (const Exception &) { if (_ExportCB != NULL) _ExportCB->dispWarning (string("ERROR: Cant load color map : ") + _Options->ColorMapFile); @@ -323,7 +323,7 @@ bool CExport::export_ (SExportOptions &options, IExportCB *expCB) NLMISC::CPath::getPathContent(_Options->OutIGDir, true, false, true, allOtherFiles); allFiles.insert(allFiles.end(), allOtherFiles.begin(), allOtherFiles.end()); } - catch (Exception &e) + catch (const Exception &e) { if (_ExportCB != NULL) _ExportCB->dispError (string("GetPathcontent failed : ") + e.what()); @@ -638,7 +638,7 @@ void CExport::treatPattern (sint32 x, sint32 y, bHaveToExportZone = false; } } - catch (Exception &e) + catch (const Exception &e) { if (_ExportCB != NULL) { @@ -668,7 +668,7 @@ void CExport::treatPattern (sint32 x, sint32 y, bHaveToExportIG = false; } } - catch (Exception &e) + catch (const Exception &e) { if (_ExportCB != NULL) { @@ -864,7 +864,7 @@ void CExport::treatPattern (sint32 x, sint32 y, COFile outFileNH (DstZoneNoHeightmapFileName); UnitZoneNoHeightmap.serial (outFileNH); } - catch (Exception &) + catch (const Exception &) { if (_ExportCB != NULL) _ExportCB->dispWarning (string("Cant write ") + DstZoneFileName); @@ -885,7 +885,7 @@ void CExport::treatPattern (sint32 x, sint32 y, if (_ExportCB != NULL) _ExportCB->dispInfo (string("Writing ") + getZoneNameFromXY(x+deltaX+i, y+deltaY+j) + ".ig"); } - catch (Exception &) + catch (const Exception &) { if (_ExportCB != NULL) _ExportCB->dispWarning (string("Cant write ") + dstIGFileName); @@ -2243,7 +2243,7 @@ void CExport::light (NL3D::CZone &zoneOut, NL3D::CZone &zoneIn) zl.light (land, zoneOut, zoneIn.getZoneId(), ld, obstacle, listzone); } - catch (Exception &e) + catch (const Exception &e) { if (_ExportCB != NULL) _ExportCB->dispError (e.what()); @@ -2425,7 +2425,7 @@ void CExport::transformCMB (const std::string &name, const NLMISC::CMatrix &tran cmb.serial(outStream); outStream.close(); } - catch (EStream &e) + catch (const EStream &e) { outStream.close(); if (_ExportCB != NULL) @@ -2437,7 +2437,7 @@ void CExport::transformCMB (const std::string &name, const NLMISC::CMatrix &tran } inStream.close(); } - catch (EStream &e) + catch (const EStream &e) { inStream.close(); if (_ExportCB != NULL) @@ -2537,7 +2537,7 @@ void CExport::transformAdditionnalIG (const std::string &name, const NLMISC::CMa igOut.serial(outStream); outStream.close(); } - catch (EStream &e) + catch (const EStream &e) { outStream.close(); if (_ExportCB != NULL) @@ -2549,7 +2549,7 @@ void CExport::transformAdditionnalIG (const std::string &name, const NLMISC::CMa } inStream.close(); } - catch (EStream &e) + catch (const EStream &e) { inStream.close(); if (_ExportCB != NULL) diff --git a/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp b/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp index 8b44ae3ae..afe6db4cb 100644 --- a/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp +++ b/code/ryzom/tools/server/build_world_packed_col/build_world_packed_col.cpp @@ -282,7 +282,7 @@ int main(int argc, char* argv[]) f.serial(ymin); f.serial(ymax); } - catch (EStream &) + catch (const EStream &) { mustRebuild = true; } @@ -397,7 +397,7 @@ int main(int argc, char* argv[]) } } - catch (Exception &e) + catch (const Exception &e) { e; // avoid compile warning nlwarning(e.what()); diff --git a/code/ryzom/tools/server/build_world_packed_col/village.cpp b/code/ryzom/tools/server/build_world_packed_col/village.cpp index 5a0d2e623..f2338d4ec 100644 --- a/code/ryzom/tools/server/build_world_packed_col/village.cpp +++ b/code/ryzom/tools/server/build_world_packed_col/village.cpp @@ -291,7 +291,7 @@ void CIGInfo::load(TShapeCache &shapeCache) shapeCache[shapeName].swap(si); } } - catch (EStream &e) + catch (const EStream &e) { // shape not loaded nlwarning(e.what()); diff --git a/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp b/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp index c923da503..431108ca1 100644 --- a/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp +++ b/code/ryzom/tools/translation_tools/extract_new_sheet_names.cpp @@ -317,7 +317,7 @@ void extractNewWords(string workSheetFileName, string columnId, IWordListBuilder { CI18N::writeTextFile(workSheetFileName.c_str(), s, false); } - catch (Exception &e) + catch (const Exception &e) { nlwarning("cannot save file: '%s'. Reason: %s", workSheetFileName.c_str(), e.what()); }