Update of /cvsroot/wgui/wgui/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8502/src
Modified Files:
wg_application.cpp wg_renderedstring.cpp
Log Message:
More informative error messages.
Index: wg_renderedstring.cpp
===================================================================
RCS file: /cvsroot/wgui/wgui/src/wg_renderedstring.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** wg_renderedstring.cpp 2 Apr 2004 17:26:16 -0000 1.14
--- wg_renderedstring.cpp 28 Apr 2004 15:41:46 -0000 1.15
***************
*** 43,47 ****
if (! m_pFontEngine)
{
! throw(Wg_Ex_App("CRenderedString::CRenderedString : Bad pFontEngine pointer!"));
}
}
--- 43,47 ----
if (! m_pFontEngine)
{
! throw(Wg_Ex_App("CRenderedString::CRenderedString : Bad pFontEngine pointer! (This is usually the result of the wgui.conf file missing or misconfigured. See the Global Config section of the docs.)"));
}
}
Index: wg_application.cpp
===================================================================
RCS file: /cvsroot/wgui/wgui/src/wg_application.cpp,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** wg_application.cpp 14 Apr 2004 16:21:21 -0000 1.51
--- wg_application.cpp 28 Apr 2004 15:41:46 -0000 1.52
***************
*** 188,191 ****
--- 188,192 ----
// <home directory>
// <current directory>
+ bool bConfigLoaded = false;
// global directory first
***************
*** 193,196 ****
--- 194,198 ----
{
m_AppLog.AddLogEntry("wGui Application config read from Global directory.", APP_LOG_INFO);
+ bConfigLoaded = true;
}
***************
*** 199,202 ****
--- 201,205 ----
{
m_AppLog.AddLogEntry("wGui Application config read from User directory.", APP_LOG_INFO);
+ bConfigLoaded = true;
}
***************
*** 205,208 ****
--- 208,217 ----
{
m_AppLog.AddLogEntry("wGui Application config read from Local directory.", APP_LOG_INFO);
+ bConfigLoaded = true;
+ }
+
+ if (!bConfigLoaded)
+ {
+ m_AppLog.AddLogEntry("wGui Application config was not found (see Global Config section of the docs).", APP_LOG_WARNING);
}
***************
*** 220,226 ****
}
if (m_GlobalConfig.EntryExists("BACKGROUNDCOLOR"))
{
! m_DefaultColorBG = CRGBColor(m_GlobalConfig.GetStringEntry("BACKGROUNDCOLOR").second);
}
--- 229,240 ----
}
+ if (!m_pDefaultFontEngine)
+ {
+ m_AppLog.AddLogEntry("wGui Application was unable to load a default font from the global config. Check to see that the specified paths are correct.", APP_LOG_WARNING);
+ }
+
if (m_GlobalConfig.EntryExists("BACKGROUNDCOLOR"))
{
! m_DefaultColorBG = CRGBColor(m_GlobalConfig.GetStringEntry("BACKGROUNDCOLOR").second);
}
***************
*** 388,392 ****
throw;
}
- wUtil::Trace("CApplication::GetFontEngine - Exception thrown while creating Font Engine : " + e.std_what());
}
}
--- 402,405 ----
|