From 37ac254476b223e4be8b36bacdab8bc9626ad67a Mon Sep 17 00:00:00 2001 From: Philipp Sehmisch Date: Thu, 21 Feb 2008 23:23:00 +0000 Subject: Showing a visible error message to the user when the font file fails to load. --- src/gui/gui.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/gui/gui.cpp') diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 12936807..8f5ffd50 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -109,9 +109,7 @@ Gui::Gui(Graphics *graphics): } catch (gcn::Exception e) { - logger->log("Unable to load dejavusans.ttf: %s", - e.getMessage().c_str()); - throw; + logger->error(std::string("Unable to load dejavusans.ttf: ") + e.getMessage()); } // Set speech font @@ -122,9 +120,7 @@ Gui::Gui(Graphics *graphics): } catch (gcn::Exception e) { - logger->log("Unable to load dejavusans.ttf: %s", - e.getMessage().c_str()); - throw; + logger->error(std::string("Unable to load dejavusans.ttf: ") + e.getMessage()); } gcn::Widget::setGlobalFont(mGuiFont); -- cgit v1.2.3-70-g09d2