RE: own label for ASSERTS and error messages

From: [at]} <frei{>
Date: Sat, 16 Mar 2002 14:30:20 +0100

----boundary-LibPST-iamunique-1031368992_-_-
Content-type: text/plain

Andrew,

actually, it should be pretty easy to write a module StdErrors as you
sketched it. Just use Dialog.MapString to map a generic error string to
a user error message.

For ASSERTs you can show a plain-text description of the trap's cause,
by providing suitable resources in the subsystem's string resource file:
module name without subsystem prefix, followed by ".", followed by the
procedure name, followed by ".", followed by the trap number. Like in
the following example:
Math.Power.23 Pre: x # 1.0 OR ABS(y) # INF
If such a resource exists, the corresponding text is shown in the trap
display.
This new BlackBox service is documented in the Dev subsystem's user
manual.

Regards
Marc Frei
Oberon microsystems, Inc.


-----Original Message-----
From: Thomas, Andrew [mailto:andrew.thomas{([at]})nowhere.xy
Sent: Dienstag, 12. März 2002 14:57
To: 'blackbox{([at]})nowhere.xy
Subject: own label for ASSERTS and error messages


Hello Oberon Crew,

        the ability in v1.4 of BlackBox is nice. I wonder if something
similar could be done for user error messages?
Maybe


        MODULE Test;

                PROCEDURE Fred (OUT ok: BOOLEAN)
                VAR
                   errorNum: INTEGER;
                BEGIN
                        xxxx
                        if error then
                                errorNum := 1;
                                StdErrors.SetError(errorNum); ok :FALSE;
                                RETURN
                        end
                END Fred;

        END Test.

        
        DEFINITION StdErrors;

        VAR
                error-: ARRAY 240 OF CHAR;

                PROCEDURE SetError(errorNum: INTEGER);

        END StdErrors.

the procedure Fred would use StdErrors.SetError to set the error string
in
StdErrors to Test.Fred.1 which could then be mapped to a useful
user message.

Regards

        Andrew
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the
word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage,
send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the
list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed
to the mailing list. That way, the list server will recognize you as
subscriber and forward your posting immediately, without creating any
overhead.

b) If, for some reason, you cannot post from the address, by which you
are subscribed, your message will be moderated to avoid spam. Please
understand that moderation will often cause some delay, in particular
over weekends or holydays.

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that mode
ration will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-1031368992_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBBbmRyZXcsXHBhcg0KXHBhcg0K
YWN0dWFsbHksIGl0IHNob3VsZCBiZSBwcmV0dHkgZWFzeSB0byB3cml0ZSBhIG1vZHVsZSBTdGRF
cnJvcnMgYXMgeW91XHBhcg0Kc2tldGNoZWQgaXQuIEp1c3QgdXNlIERpYWxvZy5NYXBTdHJpbmcg
dG8gbWFwIGEgZ2VuZXJpYyBlcnJvciBzdHJpbmcgdG9ccGFyDQphIHVzZXIgZXJyb3IgbWVzc2Fn
ZS5ccGFyDQp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ary-LibPST-iamunique-1031368992_-_---
Received on Sat Mar 16 2002 - 14:30:20 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:46 UTC