FreeType initialization errors are runtime errors, not logic errors.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 19 Feb 2005 12:24:03 +0000 (12:24 +0000)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 19 Feb 2005 12:24:03 +0000 (12:24 +0000)
bigscreen/ccbs_bigscreen.cpp

index d71b4c1..8e09f0d 100644 (file)
@@ -153,15 +153,15 @@ void init_freetype()
 {
        FT_Library library;
        if (FT_Init_FreeType(&library))
 {
        FT_Library library;
        if (FT_Init_FreeType(&library))
-               throw std::logic_error("FreeType init failed.");
+               throw std::runtime_error("FreeType init failed.");
        if (FT_New_Face(library, "/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf", 0, &font))
        if (FT_New_Face(library, "/usr/share/fonts/truetype/msttcorefonts/Georgia.ttf", 0, &font))
-               throw std::logic_error("Face opening failed.");
+               throw std::runtime_error("Face opening failed.");
        if (FT_New_Face(library, "/usr/share/fonts/truetype/freefont/FreeSerif.ttf", 0, &symbolfont))
        if (FT_New_Face(library, "/usr/share/fonts/truetype/freefont/FreeSerif.ttf", 0, &symbolfont))
-               throw std::logic_error("Face opening failed.");
+               throw std::runtime_error("Face opening failed.");
        if (FT_Set_Char_Size(font, 0, 12 * 64, 96, 96))
        if (FT_Set_Char_Size(font, 0, 12 * 64, 96, 96))
-               throw std::logic_error("Size set failed.");
+               throw std::runtime_error("Size set failed.");
        if (FT_Set_Char_Size(symbolfont, 0, 12 * 64, 96, 96))
        if (FT_Set_Char_Size(symbolfont, 0, 12 * 64, 96, 96))
-               throw std::logic_error("Size set failed.");
+               throw std::runtime_error("Size set failed.");
 }
 
 int my_draw_text(const widestring &str, unsigned char *buf, int xpos, int ypos, bool real_render, int r, int g, int b, FT_Face face, FT_Face symbolface)
 }
 
 int my_draw_text(const widestring &str, unsigned char *buf, int xpos, int ypos, bool real_render, int r, int g, int b, FT_Face face, FT_Face symbolface)