#include "textscroller.hpp"
#include <stdexcept>
-#include "msg.hpp"
+#include "log.hpp"
#include "mainloop.hpp"
#include "resources.hpp"
#include "video/font.hpp"
#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;
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
break;
}
default:
- msg_warning("text contains an unformated line");
+ log_warning << "text contains an unformated line" << std::endl;
font = white_text;
center = false;
break;
}
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;
}
break;
}
default:
- msg_warning("text contains an unformatted line");
+ log_warning << "text contains an unformatted line" << std::endl;
font = normal_font;
center = false;
break;