minor change to error message handling

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@64 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
spog 2006-05-13 12:38:06 +00:00
parent 23cc0661e0
commit a99f74dc0e

View file

@ -286,18 +286,17 @@ public:
LineLimitedTextOutputStream outputStream(getOutputStream(), 24); LineLimitedTextOutputStream outputStream(getOutputStream(), 24);
write_stack_trace(outputStream); write_stack_trace(outputStream);
getOutputStream() << "----------------\n"; getOutputStream() << "----------------\n";
globalErrorStream() << m_buffer.c_str();
if(!m_lock.locked()) if(!m_lock.locked())
{ {
ScopedLock lock(m_lock); ScopedLock lock(m_lock);
#if defined _DEBUG #if defined _DEBUG
m_buffer << "Break into the debugger?\n"; m_buffer << "Break into the debugger?\n";
globalErrorStream() << m_buffer.c_str();
bool handled = gtk_MessageBox(0, m_buffer.c_str(), "Radiant - Runtime Error", eMB_YESNO, eMB_ICONERROR) == eIDNO; bool handled = gtk_MessageBox(0, m_buffer.c_str(), "Radiant - Runtime Error", eMB_YESNO, eMB_ICONERROR) == eIDNO;
m_buffer.clear(); m_buffer.clear();
return handled; return handled;
#else #else
m_buffer << "Please report this error to the developers\n"; m_buffer << "Please report this error to the developers\n";
globalErrorStream() << m_buffer.c_str();
gtk_MessageBox(0, m_buffer.c_str(), "Radiant - Runtime Error", eMB_OK, eMB_ICONERROR); gtk_MessageBox(0, m_buffer.c_str(), "Radiant - Runtime Error", eMB_OK, eMB_ICONERROR);
m_buffer.clear(); m_buffer.clear();
return true; return true;