From: <mie...@us...> - 2009-02-24 00:48:58
|
Revision: 4216 http://oorexx.svn.sourceforge.net/oorexx/?rev=4216&view=rev Author: miesfeld Date: 2009-02-24 00:48:55 +0000 (Tue, 24 Feb 2009) Log Message: ----------- A better worded user defined message for syntax exception Modified Paths: -------------- main/trunk/extensions/platform/windows/oodialog/oovother.cpp Modified: main/trunk/extensions/platform/windows/oodialog/oovother.cpp =================================================================== --- main/trunk/extensions/platform/windows/oodialog/oovother.cpp 2009-02-23 23:26:42 UTC (rev 4215) +++ main/trunk/extensions/platform/windows/oodialog/oovother.cpp 2009-02-24 00:48:55 UTC (rev 4216) @@ -3179,10 +3179,12 @@ userDefinedMsgException(c, buffer); } -void wrongObjInDirectoryException(RexxMethodContext *c, int argPos, CSTRING index, CSTRING obj) +void wrongObjInDirectoryException(RexxMethodContext *c, int argPos, CSTRING index, CSTRING needed, RexxObjectPtr actual) { TCHAR buffer[256]; - _snprintf(buffer, sizeof(buffer), "Method argument %d is a directory and index %s is not a %s", argPos, index, obj); + _snprintf(buffer, sizeof(buffer), + "Index, %s, of method argument %d must be %s; found \"%s\"", + index, argPos, needed, c->ObjectToStringValue(actual)); userDefinedMsgException(c, buffer); } @@ -4257,7 +4259,7 @@ { if ( ! context->Logical(obj, &value) ) { - wrongObjInDirectoryException(context, argPos, index, "logical"); + wrongObjInDirectoryException(context, argPos, index, "a logical", obj); return false; } *logical = (BOOL)value; @@ -4274,7 +4276,7 @@ { if ( ! context->UnsignedInt32(obj, (uint32_t*)&value) ) { - wrongObjInDirectoryException(context, argPos, index, "number"); + wrongObjInDirectoryException(context, argPos, index, "a positive whole number", obj); return false; } *number = value; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |