<div dir="ltr">Hello,<br><div><br></div><div>I wrote the previous mail on the phone by memory, sorry. I meant i'm using cl_safe_eval, which you understood correctly.</div><div><br></div><div>I understand that cl_safe_eval(form, env, value) is just a macro to si_safe_eval(3,form,env,value), so i tried si_save_eval(2, c_string_to_obj(_expr), Cnil) as per your suggestion and it works like a charm. </div><div><br></div><div>This is great for faster development!</div><div><br></div><div>Many thanks Daniel,</div><div>Diogo</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 8 December 2015 at 06:34, Daniel Kochmański <span dir="ltr"><<a href="mailto:daniel@turtleware.eu" target="_blank">daniel@turtleware.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
do you mean si_safe_eval? I can't find save_eval function, but<br>
si_safe_eval prints the error if desired.<br>
<br>
I've added corresponding documentation issue:<br>
<a href="https://gitlab.com/embeddable-common-lisp/ecl/issues/197" rel="noreferrer" target="_blank">https://gitlab.com/embeddable-common-lisp/ecl/issues/197</a><br>
<br>
Generally, if you provice si_safe_eval with four arguments (incliding<br>
the nargs), then on error the fourth one will be returned. If you<br>
provide only three arguments, then standard debugger will be invoked and<br>
error printed (note, that you may unwind protect it, and then only the<br>
error should be printed).<br>
<br>
It's a feature, because often we don't want these things in the<br>
production code, we just want to be able to verify, if an error<br>
occurs. So if you want "normal" handling of the errors, invoke it like<br>
this:<br>
<br>
si_safe_eval(2, c_string_to_object("(hi-jack)"), ECL_NIL);<br>
<br>
(or if you want some other environment, use it instead of ECL_NIL,<br>
i.e. ecl_process_env()).<br>
<br>
Best regards,<br>
Daniel<br>
<div class="HOEnZb"><div class="h5"><br>
Diogo Franco writes:<br>
<br>
> Hi all,<br>
><br>
> Uncaught error conditions in lisp code don't display in *standard-output*<br>
> for me, when ecl is running embedded in c (i presume the reason is that i'm<br>
> calling the lisp functions using save_eval()).<br>
><br>
> My workflow on the shell while developing is then to do ctrl-c which drops<br>
> me to the REPL, and to manually execute the functions, which will print the<br>
> error.<br>
><br>
> I'm no expert on the inner workings of ecl, so forgive me if this is a dumb<br>
> question, but is there some way to get the errors in *standard-output* even<br>
> when using save_eval()?<br>
><br>
> Thanks in advance,<br>
> Diogo Franco<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Daniel Kochmański ;; aka jackdaniel | Poznań, Poland<br>
TurtleWare - Daniel Kochmański      | <a href="http://www.turtleware.eu" rel="noreferrer" target="_blank">www.turtleware.eu</a><br>
<br>
"Be the change that you wish to see in the world." - Mahatma Gandhi<br>
</font></span></blockquote></div><br></div>