Hi David,

On Mon, Nov 18, 2013 at 12:48 PM, David Ashley <[email protected]>wrote:


> I tried using an exception where I should have been able to supply my
> own error message (93000) but the message never appeared on the console
> and I got a generic message instead. So i do not know if I was not
> coding the exception call correctly or if there was something else
> amiss.
>

I'm thinking you might be coding it wrong.  In ooDialog I raise many, many
exceptions where the existing exception messages don't fit.  Take the out
of memory exception, in APICommon.cpp I have

void outOfMemoryException(RexxThreadContext *c)
{
    systemServiceException(c, NO_MEMORY_MSG);
}

where NO_MEMORY_MSG is a #define with the message string and
systemServiceException() is:

void severeErrorException(RexxThreadContext *c, const char *msg)
{
    c->RaiseException1(Rexx_Error_Interpretation_user_defined,
c->String(msg));
}

In my comments for that function:

/**
 * 49.900
 * 49 -> A severe error was detected in the language processor or execution
 *       process during internal self-consistency checks.
 *
 * 900 -> User message
 *
 */

In ooDialog/trunk/ooDialog is APICommon.cpp, and oodCommon.cpp which
contain exception functions.  Maybe you could look at those for examples


> In any case I am still trying to figure out what the best way to handle
> these types of errors are. Do we need more messages in the library or do
> we handle this as a generic case with a single type of exception?
>
>
I don't think we need anything new, the native API already has enough to
handle the types of errors you brought up, I think.

--
Mark Miesfeld
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to