os_generate_error and postmortems
Stefan Bellon
sbellon at sbellon.de
Tue Aug 24 19:51:02 BST 2004
Hi!
I'm stumbling over the fact that os_generate_error() always produces a
postmortem with stack trace which I don't want. How should I do it if I
only want an error message (printed on screen when from within the CLI
or in an error box when from within the WIMP) and a return code?
My code looks as follows:
#include <oslib/os.h>
int main(void)
{
os_error err = { 0, "foobar" };
os_generate_error(&err);
}
And then the following happens:
*cc -IOSLib: err.c
Norcroft RISC OS ARM C vsn 5.55 [17 Oct 2003]
"c.err", line 2: Warning: Non-ANSI #include <oslib/os.h>
c.err: 1 warning, 0 errors, 0 serious errors
*err
foobar
Postmortem requested
Arg2: 0x00008080 32896 -> [0xe52de004 0xe24ddc01 0xe1a0000d
0xe59f1040]
Arg1: 0x0000aae4 43748 -> [0x00727265 0x0000aae8 0x3afffff2 00000000]
80c8 in shared library function
812c in anonymous function
What am I missing here? This is with the latest OSLib 6.70.
Thanks a lot in advance!
Greetings,
Stefan.
--
Stefan Bellon
More information about the oslib-user
mailing list