Better error handling
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8811 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
9d52fa1e46
commit
d56a729041
@ -85,7 +85,7 @@ GrandPrixLose::GrandPrixLose() : Screen("grand_prix_lose.stkgui")
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
fprintf(stderr, "%s", e.what());
|
||||
fprintf(stderr, "[GrandPrixLose] WARNING: exception caught when trying to load music: %s\n", e.what());
|
||||
m_music = NULL;
|
||||
}
|
||||
} // GrandPrixLose
|
||||
|
@ -68,7 +68,7 @@ GrandPrixWin::GrandPrixWin() : Screen("grand_prix_win.stkgui")
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
fprintf(stderr, "%s", e.what());
|
||||
fprintf(stderr, "[GrandPrixWin] WARNING: exception caught when trying to load music: %s\n", e.what());
|
||||
m_music = NULL;
|
||||
}
|
||||
} // GrandPrixWin
|
||||
|
@ -389,7 +389,14 @@ void RaceResultGUI::onUpdate(float dt, irr::video::IVideoDriver*)
|
||||
|
||||
if (m_finish_sound != NULL && m_finish_sound->getStatus() != SFXManager::SFX_PLAYING)
|
||||
{
|
||||
music_manager->startMusic( music_manager->getMusicInformation("race_summary.music") );
|
||||
try
|
||||
{
|
||||
music_manager->startMusic( music_manager->getMusicInformation("race_summary.music") );
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
fprintf(stderr, "[RaceResultGUI] WARNING: exception caught when trying to load music: %s\n", e.what());
|
||||
}
|
||||
}
|
||||
} // onUpdate
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user