Re: Is there something like 'ignore-errors' in PicoLisp?

2013-08-16 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes:

Hi Alex,

 ,
 | NIL -- Target not found
 | ? 
 `
 ...
 
 I there a way to wrap the function calls send to the server in a kind of
 'ignore-errors' expression, that just returns NIL if things go wrong and
 inhibits that the server goes into debug state?

 Yes, you can 'catch' errors.

 For the above case, you could

(catch '(Target not found) .. (myProg) ..)

 Any (sub)string of an error message will do, and

(catch '() ..)

 will catch any error.


Thats what I needed - thanks. 

-- 
cheers,
Thorsten

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Is there something like 'ignore-errors' in PicoLisp?

2013-08-15 Thread Thorsten Jolitz

Hi List, 

say I call (non-interactively) a PicoLisp TCP server from a (Emacs Lisp)
program, and sometimes things go wrong, e.g.

,
| NIL -- Target not found
| ? 
`

Now the server is in state where he does not process the incoming
request - if I would probably have to send a signal to bring it back to
normal state. But since program runs non-interactively, I don't even
know about the problem. 

I there a way to wrap the function calls send to the server in a kind of
'ignore-errors' expression, that just returns NIL if things go wrong and
inhibits that the server goes into debug state?

-- 
cheers,
Thorsten


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe