X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftextscroller.cpp;h=2c7139df58168f7b067ff995bf78362cf1c58f13;hb=c0c4838b917943354c150d56ab970ca249267037;hp=c46dde3764fb875d47861a81ddbafb6139fb417d;hpb=1486ceaaf9dd7a9d2d7e3654550b9a2768df2a56;p=supertux.git diff --git a/src/textscroller.cpp b/src/textscroller.cpp index c46dde376..2c7139df5 100644 --- a/src/textscroller.cpp +++ b/src/textscroller.cpp @@ -22,7 +22,7 @@ #include "textscroller.hpp" #include -#include "msg.hpp" +#include "log.hpp" #include "mainloop.hpp" #include "resources.hpp" #include "video/font.hpp" @@ -35,7 +35,6 @@ #include "audio/sound_manager.hpp" #include "main.hpp" #include "control/joystickkeyboardcontroller.hpp" -#include "exceptions.hpp" static const float DEFAULT_SPEED = 20; static const float LEFT_BORDER = 50; @@ -84,8 +83,9 @@ TextScroller::TextScroller(const std::string& filename) text_lisp->get("speed", defaultspeed); text_lisp->get("music", music); } catch(std::exception& e) { - msg_warning("Couldn't load file '" << filename << "': " << e.what()); - return; + std::ostringstream msg; + msg << "Couldn't load file '" << filename << "': " << e.what() << std::endl; + throw std::runtime_error(msg.str()); } // Split text string lines into a vector @@ -175,7 +175,7 @@ TextScroller::draw(DrawingContext& context) break; } default: - msg_warning("text contains an unformated line"); + log_warning << "text contains an unformated line" << std::endl; font = white_text; center = false; break; @@ -230,7 +230,7 @@ InfoBox::InfoBox(const std::string& text) } catch (std::exception& e) { - msg_warning("Could not load scrolling images: " << e.what()); + log_warning << "Could not load scrolling images: " << e.what() << std::endl; arrow_scrollup = 0; arrow_scrolldown = 0; } @@ -288,7 +288,7 @@ InfoBox::draw(DrawingContext& context) break; } default: - msg_warning("text contains an unformatted line"); + log_warning << "text contains an unformatted line" << std::endl; font = normal_font; center = false; break;