mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Changed: Constification of catches
This commit is contained in:
parent
1840d26972
commit
65c74399b0
10 changed files with 23 additions and 23 deletions
|
@ -590,7 +590,7 @@ void CMainFrame::OnFileLoadconfig()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception& e)
|
catch (const Exception& e)
|
||||||
{
|
{
|
||||||
MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
}
|
}
|
||||||
|
@ -762,7 +762,7 @@ void CMainFrame::OnFileSaveconfig()
|
||||||
{
|
{
|
||||||
ObjView->serial(file);
|
ObjView->serial(file);
|
||||||
}
|
}
|
||||||
catch (Exception& e)
|
catch (const Exception& e)
|
||||||
{
|
{
|
||||||
MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ void CMeshDlg::OnBrowseShape()
|
||||||
m_ShapeName = (std::string(fname) + ext).c_str();
|
m_ShapeName = (std::string(fname) + ext).c_str();
|
||||||
touchPSState();
|
touchPSState();
|
||||||
}
|
}
|
||||||
catch (NLMISC::Exception &e)
|
catch (const NLMISC::Exception &e)
|
||||||
{
|
{
|
||||||
MessageBox(utf8ToTStr(e.what()), _T("shape loading error"));
|
MessageBox(utf8ToTStr(e.what()), _T("shape loading error"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -534,7 +534,7 @@ void CObjectViewer::loadConfigFile()
|
||||||
if (var = cf.getVarPtr("cloud_wind_speed"))
|
if (var = cf.getVarPtr("cloud_wind_speed"))
|
||||||
_CSS.WindSpeed = var->asFloat();
|
_CSS.WindSpeed = var->asFloat();
|
||||||
}
|
}
|
||||||
catch (Exception& e)
|
catch (const Exception& e)
|
||||||
{
|
{
|
||||||
::MessageBox (NULL, utf8ToTStr(e.what()), _T("Objectviewer.cfg"), MB_OK|MB_ICONEXCLAMATION);
|
::MessageBox (NULL, utf8ToTStr(e.what()), _T("Objectviewer.cfg"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
}
|
}
|
||||||
|
@ -822,7 +822,7 @@ bool CObjectViewer::initUI (HWND parent)
|
||||||
{
|
{
|
||||||
iF.serial(SchemeManager);
|
iF.serial(SchemeManager);
|
||||||
}
|
}
|
||||||
catch (NLMISC::EStream &e)
|
catch (const NLMISC::EStream &e)
|
||||||
{
|
{
|
||||||
std::string msg = toString("Unable to load the default scheme bank file : %s", e.what());
|
std::string msg = toString("Unable to load the default scheme bank file : %s", e.what());
|
||||||
::MessageBox(NULL, utf8ToTStr(msg), _T("Object Viewer"), MB_ICONEXCLAMATION);
|
::MessageBox(NULL, utf8ToTStr(msg), _T("Object Viewer"), MB_ICONEXCLAMATION);
|
||||||
|
@ -1896,7 +1896,7 @@ bool CObjectViewer::loadInstanceGroup(const std::string &igFilename)
|
||||||
// Append the ig.
|
// Append the ig.
|
||||||
addInstanceGroup(ig);
|
addInstanceGroup(ig);
|
||||||
}
|
}
|
||||||
catch (Exception& e)
|
catch (const Exception& e)
|
||||||
{
|
{
|
||||||
// clean
|
// clean
|
||||||
delete ig;
|
delete ig;
|
||||||
|
@ -1961,7 +1961,7 @@ bool CObjectViewer::loadMesh (std::vector<std::string> &meshFilename, const std:
|
||||||
// Add the shape
|
// Add the shape
|
||||||
shapeSkel=streamShape.getShapePointer();
|
shapeSkel=streamShape.getShapePointer();
|
||||||
}
|
}
|
||||||
catch (Exception& e)
|
catch (const Exception& e)
|
||||||
{
|
{
|
||||||
_MainFrame->MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
_MainFrame->MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
|
||||||
|
@ -2014,7 +2014,7 @@ bool CObjectViewer::loadMesh (std::vector<std::string> &meshFilename, const std:
|
||||||
// Add the shape
|
// Add the shape
|
||||||
shapeMesh=streamShape.getShapePointer();
|
shapeMesh=streamShape.getShapePointer();
|
||||||
}
|
}
|
||||||
catch (Exception& e)
|
catch (const Exception& e)
|
||||||
{
|
{
|
||||||
_MainFrame->MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
_MainFrame->MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
continue;
|
continue;
|
||||||
|
@ -3219,7 +3219,7 @@ bool CObjectViewer::createVegetableLandscape()
|
||||||
_VegetableCollisionManager->setLandscape(&_VegetableLandscape->Landscape);
|
_VegetableCollisionManager->setLandscape(&_VegetableLandscape->Landscape);
|
||||||
_VegetableCollisionEntity= _VegetableCollisionManager->createEntity();
|
_VegetableCollisionEntity= _VegetableCollisionManager->createEntity();
|
||||||
}
|
}
|
||||||
catch (Exception &e)
|
catch (const Exception &e)
|
||||||
{
|
{
|
||||||
// close the progress dialog
|
// close the progress dialog
|
||||||
dlgProgress.DestroyWindow();
|
dlgProgress.DestroyWindow();
|
||||||
|
@ -3776,7 +3776,7 @@ void CObjectViewer::shootScene()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception &e)
|
catch (const Exception &e)
|
||||||
{
|
{
|
||||||
std::string message = toString("Error during writing of the file %s: %s", filenamefinal.c_str(), e.what());
|
std::string message = toString("Error during writing of the file %s: %s", filenamefinal.c_str(), e.what());
|
||||||
_MainFrame->MessageBox (utf8ToTStr(message), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
_MainFrame->MessageBox (utf8ToTStr(message), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
|
|
@ -419,7 +419,7 @@ bool CParticleDlg::savePSAs(HWND parent, CParticleWorkspace::CNode &psNode ,cons
|
||||||
psNode.setModified(false);
|
psNode.setModified(false);
|
||||||
setStatusBarText(CString(fullPath.c_str()) + " " + getStrRsc(IDS_SAVED));
|
setStatusBarText(CString(fullPath.c_str()) + " " + getStrRsc(IDS_SAVED));
|
||||||
}
|
}
|
||||||
catch (NLMISC::Exception &e)
|
catch (const NLMISC::Exception &e)
|
||||||
{
|
{
|
||||||
if (askToContinueWhenError)
|
if (askToContinueWhenError)
|
||||||
{
|
{
|
||||||
|
@ -468,7 +468,7 @@ bool CParticleDlg::loadPS(HWND parent, CParticleWorkspace::CNode &psNode, TLoadP
|
||||||
setStatusBarText(CString(psNode.getFullPath().c_str()) + " " + getStrRsc(IDS_LOADED));
|
setStatusBarText(CString(psNode.getFullPath().c_str()) + " " + getStrRsc(IDS_LOADED));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (NLMISC::Exception &e)
|
catch (const NLMISC::Exception &e)
|
||||||
{
|
{
|
||||||
switch(behav)
|
switch(behav)
|
||||||
{
|
{
|
||||||
|
@ -547,7 +547,7 @@ void CParticleDlg::OnCreateNewPsWorkspace()
|
||||||
{
|
{
|
||||||
newPW->save();
|
newPW->save();
|
||||||
}
|
}
|
||||||
catch(NLMISC::EStream &e)
|
catch(const NLMISC::EStream &e)
|
||||||
{
|
{
|
||||||
MessageBox(utf8ToTStr(e.what()), getStrRsc(IDS_ERROR), MB_ICONEXCLAMATION);
|
MessageBox(utf8ToTStr(e.what()), getStrRsc(IDS_ERROR), MB_ICONEXCLAMATION);
|
||||||
}
|
}
|
||||||
|
@ -583,7 +583,7 @@ void CParticleDlg::loadWorkspace(const std::string &fullPath)
|
||||||
newPW->load();
|
newPW->load();
|
||||||
setStatusBarText(CString(newPW->getFilename().c_str()) + " " + getStrRsc(IDS_LOADED));
|
setStatusBarText(CString(newPW->getFilename().c_str()) + " " + getStrRsc(IDS_LOADED));
|
||||||
}
|
}
|
||||||
catch(NLMISC::EStream &e)
|
catch(const NLMISC::EStream &e)
|
||||||
{
|
{
|
||||||
MessageBox(utf8ToTStr(e.what()), getStrRsc(IDS_ERROR), MB_ICONEXCLAMATION);
|
MessageBox(utf8ToTStr(e.what()), getStrRsc(IDS_ERROR), MB_ICONEXCLAMATION);
|
||||||
setStatusBarText(CString(e.what()));
|
setStatusBarText(CString(e.what()));
|
||||||
|
@ -633,7 +633,7 @@ void CParticleDlg::saveWorkspaceStructure()
|
||||||
_PW->save();
|
_PW->save();
|
||||||
setStatusBarText(CString(_PW->getFilename().c_str()) + " " + getStrRsc(IDS_SAVED));
|
setStatusBarText(CString(_PW->getFilename().c_str()) + " " + getStrRsc(IDS_SAVED));
|
||||||
}
|
}
|
||||||
catch(NLMISC::EStream &e)
|
catch(const NLMISC::EStream &e)
|
||||||
{
|
{
|
||||||
localizedMessageBox(*this, utf8ToTStr(e.what()), IDS_ERROR, MB_ICONEXCLAMATION);
|
localizedMessageBox(*this, utf8ToTStr(e.what()), IDS_ERROR, MB_ICONEXCLAMATION);
|
||||||
setStatusBarText(CString(e.what()));
|
setStatusBarText(CString(e.what()));
|
||||||
|
|
|
@ -1037,7 +1037,7 @@ BOOL CParticleTreeCtrl::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHA
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(NLMISC::EStream &e)
|
catch(const NLMISC::EStream &e)
|
||||||
{
|
{
|
||||||
MessageBox(utf8ToTStr(e.what()), getStrRsc(IDS_ERROR), MB_OK|MB_ICONEXCLAMATION);
|
MessageBox(utf8ToTStr(e.what()), getStrRsc(IDS_ERROR), MB_OK|MB_ICONEXCLAMATION);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -107,7 +107,7 @@ void CSchemeBankDlg::OnSaveBank()
|
||||||
iF.open(tStrToUtf8(fd.GetFileName()));
|
iF.open(tStrToUtf8(fd.GetFileName()));
|
||||||
iF.serial(SchemeManager);
|
iF.serial(SchemeManager);
|
||||||
}
|
}
|
||||||
catch (std::exception &e)
|
catch (const std::exception &e)
|
||||||
{
|
{
|
||||||
std::string message = NLMISC::toString("Error saving scheme bank : %s", e.what());
|
std::string message = NLMISC::toString("Error saving scheme bank : %s", e.what());
|
||||||
MessageBox(utf8ToTStr(message), _T("Object viewer"), MB_ICONEXCLAMATION | MB_OK);
|
MessageBox(utf8ToTStr(message), _T("Object viewer"), MB_ICONEXCLAMATION | MB_OK);
|
||||||
|
@ -134,7 +134,7 @@ void CSchemeBankDlg::OnLoadBank()
|
||||||
iF.serial(sm);
|
iF.serial(sm);
|
||||||
SchemeManager.swap(sm);
|
SchemeManager.swap(sm);
|
||||||
}
|
}
|
||||||
catch (std::exception &e)
|
catch (const std::exception &e)
|
||||||
{
|
{
|
||||||
std::string message = NLMISC::toString("Error loading scheme bank : %s", e.what());
|
std::string message = NLMISC::toString("Error loading scheme bank : %s", e.what());
|
||||||
MessageBox(utf8ToTStr(message), _T("Object viewer"), MB_ICONEXCLAMATION | MB_OK);
|
MessageBox(utf8ToTStr(message), _T("Object viewer"), MB_ICONEXCLAMATION | MB_OK);
|
||||||
|
|
|
@ -1310,7 +1310,7 @@ bool CSkeletonScaleDlg::saveSkelScaleInStream(NLMISC::IStream &f)
|
||||||
sint32 ver= f.serialVersion(0);
|
sint32 ver= f.serialVersion(0);
|
||||||
f.serialCont(boneScales);
|
f.serialCont(boneScales);
|
||||||
}
|
}
|
||||||
catch(NLMISC::EStream &)
|
catch(const NLMISC::EStream &)
|
||||||
{
|
{
|
||||||
MessageBox(_T("Failed to save file!"));
|
MessageBox(_T("Failed to save file!"));
|
||||||
return false;
|
return false;
|
||||||
|
@ -1356,7 +1356,7 @@ bool CSkeletonScaleDlg::loadSkelScaleFromStream(NLMISC::IStream &f)
|
||||||
// and update display
|
// and update display
|
||||||
refreshTextViews();
|
refreshTextViews();
|
||||||
}
|
}
|
||||||
catch(NLMISC::EStream &)
|
catch(const NLMISC::EStream &)
|
||||||
{
|
{
|
||||||
MessageBox(_T("Failed to save file!"));
|
MessageBox(_T("Failed to save file!"));
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -234,7 +234,7 @@ void CSoundAnimView::save()
|
||||||
{
|
{
|
||||||
CSoundAnimManager::instance()->saveAnimation(anim, filename);
|
CSoundAnimManager::instance()->saveAnimation(anim, filename);
|
||||||
}
|
}
|
||||||
catch (Exception& e)
|
catch (const Exception& e)
|
||||||
{
|
{
|
||||||
MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
MessageBox (utf8ToTStr(e.what()), _T("NeL object viewer"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,7 @@ void CTextureChooser::OnBrowseTexture()
|
||||||
_Texture = tf;
|
_Texture = tf;
|
||||||
textureToBitmap();
|
textureToBitmap();
|
||||||
}
|
}
|
||||||
catch (NLMISC::Exception &e)
|
catch (const NLMISC::Exception &e)
|
||||||
{
|
{
|
||||||
MessageBox(utf8ToTStr(e.what()), _T("error loading texture"));
|
MessageBox(utf8ToTStr(e.what()), _T("error loading texture"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ MissionCompilerMainWindow::MissionCompilerMainWindow(QWidget *parent) :
|
||||||
try{
|
try{
|
||||||
m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false);
|
m_ligoConfig.readPrimitiveClass(NLMISC::CPath::lookup("world_editor_classes.xml").c_str(), false);
|
||||||
}
|
}
|
||||||
catch( NLMISC::Exception &e )
|
catch(const NLMISC::Exception &e)
|
||||||
{
|
{
|
||||||
nlinfo( "Exception occurred during Mission Compiler LIGO startup: %s", e.what() );
|
nlinfo( "Exception occurred during Mission Compiler LIGO startup: %s", e.what() );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue