Improved error handling.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39573 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis 2006-06-05 18:08:40 +00:00
parent daf22b890b
commit da51aebeec
3 changed files with 104 additions and 4 deletions

View File

@ -139,7 +139,7 @@ wxWindowDC::wxWindowDC(
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table. Error: %s\n"), sError.c_str());
wxLogError(_T("Unable to set current color table (3). Error: %s\n"), sError.c_str());
}
::GpiCreateLogColorTable( m_hPS
,0L
@ -239,7 +239,7 @@ wxClientDC::wxClientDC(
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table. Error: %s\n"), sError.c_str());
wxLogError(_T("Unable to set current color table (4). Error: %s\n"), sError.c_str());
}
::GpiCreateLogColorTable( m_hPS
,0L

View File

@ -481,6 +481,106 @@ wxString wxPMErrorToStr(ERRORID vError)
sError = wxT("Valid name format, but cannot find name in atom table");
break;
case PMERR_INV_HPS:
sError = wxT("PMERR_INV_HPS");
break;
case PMERR_PS_BUSY:
sError = wxT("PMERR_PS_BUSY");
break;
case PMERR_INV_PRIMITIVE_TYPE:
sError = wxT("PMERR_INV_PRIMITIVE_TYPE");
break;
case PMERR_UNSUPPORTED_ATTR:
sError = wxT("PMERR_UNSUPPORTED_ATTR");
break;
case PMERR_INV_COLOR_ATTR:
sError = wxT("PMERR_INV_COLOR_ATTR");
break;
case PMERR_INV_BACKGROUND_COL_ATTR:
sError = wxT("PMERR_INV_BACKGROUND_COL_ATTR");
break;
case PMERR_INV_MIX_ATTR:
sError = wxT("PMERR_INV_MIX_ATTR");
break;
case PMERR_INV_LINE_WIDTH_ATTR:
sError = wxT("PMERR_INV_LINE_WIDTH_ATTR");
break;
case PMERR_INV_GEOM_LINE_WIDTH_ATTR:
sError = wxT("PMERR_INV_GEOM_LINE_WIDTH_ATTR");
break;
case PMERR_INV_LINE_TYPE_ATTR:
sError = wxT("PMERR_INV_LINE_TYPE_ATTR");
break;
case PMERR_INV_LINE_END_ATTR:
sError = wxT("PMERR_INV_LINE_END_ATTR");
break;
case PMERR_INV_LINE_JOIN_ATTR:
sError = wxT("PMERR_INV_LINE_JOIN_ATTR");
break;
case PMERR_INV_CHAR_SET_ATTR:
sError = wxT("PMERR_INV_CHAR_SET_ATTR");
break;
case PMERR_INV_CHAR_MODE_ATTR:
sError = wxT("PMERR_INV_CHAR_MODE_ATTR");
break;
case PMERR_INV_CHAR_DIRECTION_ATTR:
sError = wxT("PMERR_INV_CHAR_DIRECTION_ATTR");
break;
case PMERR_INV_CHAR_SHEAR_ATTR:
sError = wxT("PMERR_INV_CHAR_SHEAR_ATTR");
break;
case PMERR_INV_CHAR_ANGLE_ATTR:
sError = wxT("PMERR_INV_CHAR_ANGLE_ATTR");
break;
case PMERR_INV_MARKER_SET_ATTR:
sError = wxT("PMERR_INV_MARKER_SET_ATTR");
break;
case PMERR_INV_MARKER_SYMBOL_ATTR:
sError = wxT("PMERR_INV_MARKER_SYMBOL_ATTR");
break;
case PMERR_INV_PATTERN_SET_ATTR:
sError = wxT("PMERR_INV_PATTERN_SET_ATTR");
break;
case PMERR_INV_PATTERN_ATTR:
sError = wxT("PMERR_INV_PATTERN_ATTR");
break;
case PMERR_INV_COORDINATE:
sError = wxT("PMERR_INV_COORDINATE");
break;
case PMERR_UNSUPPORTED_ATTR_VALUE:
sError = wxT("PMERR_UNSUPPORTED_ATTR_VALUE");
break;
case PMERR_INV_PATTERN_SET_FONT:
sError = wxT("PMERR_INV_PATTERN_SET_FONT");
break;
case PMERR_HUGE_FONTS_NOT_SUPPORTED:
sError = wxT("PMERR_HUGE_FONTS_NOT_SUPPORTED");
break;
default:
sError = wxT("Unknown error");
}

View File

@ -3294,7 +3294,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table. Error: %s\n"), sError.c_str());
wxLogError(_T("Unable to set current color table (1). Error: %s\n"), sError.c_str());
}
//
// Set the color table to RGB mode
@ -3309,7 +3309,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId,
{
vError = ::WinGetLastError(vHabmain);
sError = wxPMErrorToStr(vError);
wxLogError(_T("Unable to set current color table. Error: %s\n"), sError.c_str());
wxLogError(_T("Unable to set current color table (2). Error: %s\n"), sError.c_str());
}
wxCHECK( pMenuItem->IsKindOf(CLASSINFO(wxMenuItem)), FALSE );