[m-users.] Uncaught mercury exception using try []

Sean Charles (emacstheviking) objitsu at gmail.com
Sat May 29 05:12:14 AEST 2021


I feel better already for knowing they are only half useless, I mean, it could have been worse.



> On 28 May 2021, at 20:11, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
> 
> 
> 2021-05-28 07:10 GMT+10:00 "Sean Charles (emacstheviking)" <objitsu at gmail.com>:
>> Hmmm. They -work- in so far as they generate output when I set the relevant environment variables so I am not sure I understand why they are -useless- to that extent.
> 
> Logging, such as your calls to atrace, can tell you two things.
> 
> 1 When you get output, it tells you "execution got here, with these values".
> 
> 2 When you don't get output, it tells you "execution did not get here".
> 
> But if the call can be optimized away by the compiler, you cannot tell *anything*
> from the absence of logging output. So you are right, those calls are not
> fully useless, they are only *half* useless :-(
> 
>> so I should be doing, at the relevant call sites,
>> 
>> 	trace[io(!Dbg) (atrace…) 
>> 
>> instead of
>> 
>> 	atrace() :- … blah
>> 
>> yes? 
> 
> Yes.
> 
>> Would that mean then I have to repeatedly use runtime(env(“…”)) at every call site as well.
> 
> Yes.
> 
> Zoltan.



More information about the users mailing list