I don't know if this is the correct way to do it, but I did:
(defparameter *debugger-hook* #'sys::%debugger-hook-function)
In the repl (from running java -jar abcl.jar), this worked as expected. However, I can't seem to get it working with the .eval function of my interpreter instance.
JonathanOn Tue, Feb 19, 2013 at 5:07 PM, Alessio Stalla <alessiostalla@gmail.com> wrote:
Short story: if you call into Lisp using the JSR-223 API, conditions
are automatically rethrown as Java exceptions.
Long story: the way this is implemented is by binding *debugger-hook*
to an internal, probably undocumented function, that already does what
you want. It is called sys::%debugger-hook-function.
On Tue, Feb 19, 2013 at 4:25 PM, Jonathan Fischer Friberg
<odyssomay@gmail.com> wrote:> _______________________________________________
> I should add that a solution from inside CL would also work. I'm using the
> ABCL eval to execute all code, so maybe I could wrap the call with something
> like this:
>
> (handler-case
> (... do-stuff ...)
> (... catch CL-condition + throw java exception ...))
>
> I don't know if that would work. Also, my CL skills are not good enough to
> finish the code above (how do I capture all conditions?), so help would be
> appreciated.
>
> Jonathan
>
>
> On Tue, Feb 19, 2013 at 3:30 PM, Jonathan Fischer Friberg
> <odyssomay@gmail.com> wrote:
>>
>> Hi again, :)
>>
>> I'm currently running CL-code from java. The gui is completely implemented
>> on the java side. It would be nice if all errors occuring inside abcl could
>> be captured from the java side (to be displayed in the gui as an error). Is
>> that possible?
>>
>> Jonathan
>
>
>
> armedbear-devel mailing list
> armedbear-devel@common-lisp.net
> http://lists.common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
>
--
Some gratuitous spam:
http://ripple-project.org Ripple, social credit system
http://villages.cc Villages.cc, Ripple-powered community economy
http://common-lisp.net/project/armedbear ABCL, Common Lisp on the JVM
http://code.google.com/p/tapulli my current open source projects
http://www.manydesigns.com/ ManyDesigns Portofino, open source
model-driven Java web application framework