[M3devel] Style question about error messages
Tony Hosking
hosking at cs.purdue.edu
Tue Feb 23 20:15:32 CET 2010
You can just record that exception as fatal in that code block with the <*FATAL Thread.Alerted*> pragma.
On 23 Feb 2010, at 13:19, hendrik at topoi.pooq.com wrote:
> Somewhere in my program after it has trued and failed to read the
> input file, I have the code
>
> Wr.PutText(Stdio.stderr, "No input file.\n");
>
> Now presumably this message could be more detailed, but that's not waht
> I'm asking. What happens to me when I compile this code is the warning:
>
> "../src/Main.m3", line 63: warning: potentially unhandled exceptions:
> Thread.Alerted, Wr.Failure
>
> Now presumably this is an indication that I ought to wrap the whole
> thing in a TRY clause. But what am I supposed to do if the attempt to
> produce an error message fails? Write an error message?
>
> What have other people done in this situation?
>
> --hendrik
More information about the M3devel
mailing list