diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-02-16 21:28:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-02-16 21:28:08 +0300 |
commit | 82ac4641828ec7387863bb18cf4493190c4cc68f (patch) | |
tree | 54fa2aeeff83109ca289894bf08bc767084050a3 /src/gui/gui.cpp | |
parent | 07e8275965ccb989e3bcc288e2440bffcbca4a8e (diff) | |
download | manaplus-82ac4641828ec7387863bb18cf4493190c4cc68f.tar.gz manaplus-82ac4641828ec7387863bb18cf4493190c4cc68f.tar.bz2 manaplus-82ac4641828ec7387863bb18cf4493190c4cc68f.tar.xz manaplus-82ac4641828ec7387863bb18cf4493190c4cc68f.zip |
Remove Exception class.
Diffstat (limited to 'src/gui/gui.cpp')
-rw-r--r-- | src/gui/gui.cpp | 69 |
1 files changed, 6 insertions, 63 deletions
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 649e547d7..08794d478 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -53,8 +53,6 @@ #include "utils/langs.h" #include "utils/timer.h" -#include "gui/base/exception.hpp" - #include "debug.h" // Guichan stuff @@ -162,16 +160,7 @@ void Gui::postInit(Graphics *const graphics) if (fontFile.empty()) fontFile = branding.getStringValue("font"); - try - { - mGuiFont = new SDLFont(fontFile, fontSize); - } - catch (const gcn::Exception &e) - { - logger->error(std::string("Unable to load '").append(fontFile) - .append("': ").append(e.getMessage())); - } - + mGuiFont = new SDLFont(fontFile, fontSize); // Set particle font fontFile = config.getValue("particleFont", ""); @@ -190,65 +179,28 @@ void Gui::postInit(Graphics *const graphics) if (fontFile.empty()) fontFile = branding.getStringValue("particleFont"); - try - { - mInfoParticleFont = new SDLFont( - fontFile, fontSize, TTF_STYLE_BOLD); - } - catch (const gcn::Exception &e) - { - logger->error(std::string("Unable to load '").append(fontFile) - .append("': ").append(e.getMessage())); - } - + mInfoParticleFont = new SDLFont(fontFile, fontSize, TTF_STYLE_BOLD); // Set bold font fontFile = config.getValue("boldFont", ""); if (fontFile.empty()) fontFile = branding.getStringValue("boldFont"); - try - { - boldFont = new SDLFont(fontFile, fontSize); - } - catch (const gcn::Exception &e) - { - logger->error(std::string("Unable to load '").append(fontFile) - .append("': ").append(e.getMessage())); - } - + boldFont = new SDLFont(fontFile, fontSize); // Set help font fontFile = config.getValue("helpFont", ""); if (fontFile.empty()) fontFile = branding.getStringValue("helpFont"); - try - { - mHelpFont = new SDLFont(fontFile, fontSize); - } - catch (const gcn::Exception &e) - { - logger->error(std::string("Unable to load '").append(fontFile) - .append("': ").append(e.getMessage())); - } - + mHelpFont = new SDLFont(fontFile, fontSize); // Set secure font fontFile = config.getValue("secureFont", ""); if (fontFile.empty()) fontFile = branding.getStringValue("secureFont"); - try - { - mSecureFont = new SDLFont(fontFile, fontSize); - } - catch (const gcn::Exception &e) - { - logger->error(std::string("Unable to load '").append(fontFile) - .append("': ").append(e.getMessage())); - } - + mSecureFont = new SDLFont(fontFile, fontSize); // Set npc font const int npcFontSize = config.getIntValue("npcfontSize"); @@ -268,15 +220,7 @@ void Gui::postInit(Graphics *const graphics) if (fontFile.empty()) fontFile = branding.getStringValue("npcFont"); - try - { - mNpcFont = new SDLFont(fontFile, npcFontSize); - } - catch (const gcn::Exception &e) - { - logger->error(std::string("Unable to load '").append(fontFile) - .append("': ").append(e.getMessage())); - } + mNpcFont = new SDLFont(fontFile, npcFontSize); gcn::Widget::setGlobalFont(mGuiFont); @@ -853,7 +797,6 @@ void Gui::handleMouseInput() handleMouseWheelMovedUp(mouseInput); break; default: - throw GCN_EXCEPTION("Unknown mouse input type."); break; } } |