Swank server dies with any error in REPL

Daniel Kochmański daniel at turtleware.eu
Tue Sep 1 13:34:38 UTC 2015


Hello,

if you call lisp forms from C code (after cl_boot), then you have no set
handler, so if your code signals a condition, then it goes uncought. If
that's a case, you could do something, what toplevel does (setting
handlers etc), or set si::*break-level* to 1 and call tpl:

(let ((si::*break-level* 1)) (si::tpl))

this should spawn toplevel console and won't exit. If you want to set
proper handler consult src/lsp/tpl.lsp file in ECL sourcecode.

Regards,
Daniel

bruce li writes:

> Hi, there,
> I'm pretty new to ECL. I'm currently considering embedding ECL in a
> game engine. When I interactively interrupt the program and drop into
> the repl, I load up swank with quicklisp and create swank server with
> (swank:create-server :port 4005).  I can connect to it from SLIME. But
> any error in the statement, either by deliberately typing sth wrong,
> will cause swank server to close instead of dropping into the
> debugging environment. I have no idea why this happens. It turns out
> that if I start swank on a different thread with
> mp:process-run-function, it goes well. But since the game engine is
> based on OpenGL, multithreading rendering isn't an option. I wonder if
> there is any way to get around the swank server and enable its
> debugger when it encounters error.
>
> Thanks,
> Bruce

-- 
Daniel Kochmański | Poznań, Poland
;; aka jackdaniel

"Be the change that you wish to see in the world." - Mahatma Gandhi



More information about the ecl-devel mailing list