all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Exception Handling in LISP.
  2003-04-25 11:01 Problem positioning cursor Victor Kirk
@ 2003-04-25 12:27 ` Gurucharan
       [not found] ` <mailman.5189.1051273202.21513.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Gurucharan @ 2003-04-25 12:27 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 421 bytes --]

Hi All,
        Can we catch any unknown exception in Lisp like C++ ?

That is, like the C++ ... (Epsilon code).
can we catch any exception irrespective of which
exception was thrown ?

Example:
try {
     // Something ....
}
catch (...) {    // Do something after Exception has occurred ...
                }

Any material/links on Exception Handling in LISP
is welcome.

Thanks.

Kind Regards,
            gurucharan



[-- Attachment #1.2: Type: text/html, Size: 945 bytes --]

[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Exception Handling in LISP.
       [not found] ` <mailman.5189.1051273202.21513.help-gnu-emacs@gnu.org>
@ 2003-04-25 13:25   ` David Kastrup
  2003-04-25 14:10   ` Kai Großjohann
  1 sibling, 0 replies; 7+ messages in thread
From: David Kastrup @ 2003-04-25 13:25 UTC (permalink / raw)


Gurucharan <gurucharan.murudeshwar@wipro.com> writes:

> Hi All,
>         Can we catch any unknown exception in Lisp like C++ ?
> 
> That is, like the C++ ... (Epsilon code).
> can we catch any exception irrespective of which
> exception was thrown ?
> 
> Example:
> try {
>      // Something ....
> }
> catch (...) {    // Do something after Exception has occurred ...
>                 }
> 
> Any material/links on Exception Handling in LISP
> is welcome.

Take a look at catch, throw, condition-case and unwind-protect in the
Elisp manual.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Exception Handling in LISP.
       [not found] ` <mailman.5189.1051273202.21513.help-gnu-emacs@gnu.org>
  2003-04-25 13:25   ` David Kastrup
@ 2003-04-25 14:10   ` Kai Großjohann
  1 sibling, 0 replies; 7+ messages in thread
From: Kai Großjohann @ 2003-04-25 14:10 UTC (permalink / raw)


Gurucharan <gurucharan.murudeshwar@wipro.com> writes:

> Can we catch any unknown exception in Lisp like C++ ?

Emacs Lisp has throw/catch and signal/condition-case.  I guess
signal/condition-case is more like what you want, since errors are a
special kind of signal.

Both provide ways to just `catch everything'.
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Exception Handling in LISP.
@ 2003-04-25 15:15 Bruce Park
  0 siblings, 0 replies; 7+ messages in thread
From: Bruce Park @ 2003-04-25 15:15 UTC (permalink / raw)


>From: Gurucharan <gurucharan.murudeshwar@wipro.com>
>To: "'help-gnu-emacs@gnu.org'" <help-gnu-emacs@gnu.org>
>Subject: Exception Handling in LISP.
>Date: Fri, 25 Apr 2003 17:57:37 +0530
>
>Hi All,
>         Can we catch any unknown exception in Lisp like C++ ?
>
>That is, like the C++ ... (Epsilon code).
>can we catch any exception irrespective of which
>exception was thrown ?
>
>Example:
>try {
>      // Something ....
>}
>catch (...) {    // Do something after Exception has occurred ...
>                 }
>
>Any material/links on Exception Handling in LISP
>is welcome.
Last time I checked, exception handling is NOT a part of LISP. Remember, 
LISP falls into logic programming.
>
>Thanks.
>
>Kind Regards,
>             gurucharan
>
>
>_______________________________________________
>Help-gnu-emacs mailing list
>Help-gnu-emacs@gnu.org
>http://mail.gnu.org/mailman/listinfo/help-gnu-emacs


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Exception Handling in LISP.
       [not found] <mailman.5195.1051283788.21513.help-gnu-emacs@gnu.org>
@ 2003-04-25 15:44 ` Jesper Harder
  2003-04-25 17:06 ` Kai Großjohann
  1 sibling, 0 replies; 7+ messages in thread
From: Jesper Harder @ 2003-04-25 15:44 UTC (permalink / raw)


"Bruce Park" <bpark79@hotmail.com> writes:

> Last time I checked, exception handling is NOT a part of LISP.

It must have been a long time since you checked :-) The ancient Lisps of
the 60s (Lisp 1.5 etc) didn't have built-in exception handling.

But Lisp (including Emacs Lisp and Common Lisp) has had exception
handling for a long time.

The OP might want to check Kent Pitman's paper "Exceptional Situations
In Lisp" for a discussion of exception handling in Common Lisp:

<http://www.nhplace.com/kent/Papers/Exceptional-Situations-1990.html>

> Remember, LISP falls into logic programming.

It doesn't.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Exception Handling in LISP.
       [not found] <mailman.5195.1051283788.21513.help-gnu-emacs@gnu.org>
  2003-04-25 15:44 ` Jesper Harder
@ 2003-04-25 17:06 ` Kai Großjohann
  1 sibling, 0 replies; 7+ messages in thread
From: Kai Großjohann @ 2003-04-25 17:06 UTC (permalink / raw)


"Bruce Park" <bpark79@hotmail.com> writes:

> Remember, LISP falls into logic programming.

One could say that Lisp is a functional language, but it's surely not
a logic programming language.

(There are two views on functional programming: one view requires
some features to be present (functions as first-class objects, ...),
and the other additionally forbids other features from being present
(assignments, ...).  Lisp is a functional language only according to
the former.)
-- 
file-error; Data: (Opening input file no such file or directory ~/.signature)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Exception Handling in LISP.
@ 2003-04-26  1:21 Bruce Park
  0 siblings, 0 replies; 7+ messages in thread
From: Bruce Park @ 2003-04-26  1:21 UTC (permalink / raw)


>From: kai.grossjohann@gmx.net (Kai Großjohann)
>To: help-gnu-emacs@gnu.org
>Subject: Re: Exception Handling in LISP.
>Date: Fri, 25 Apr 2003 19:06:48 +0200
>
>"Bruce Park" <bpark79@hotmail.com> writes:
>
> > Remember, LISP falls into logic programming.
>
>One could say that Lisp is a functional language, but it's surely not
>a logic programming language.
Oops. I meant to say functional. I was thinking of Prolog and not LISP. 
Sorry for the confusion.
>
>(There are two views on functional programming: one view requires
>some features to be present (functions as first-class objects, ...),
>and the other additionally forbids other features from being present
>(assignments, ...).  Lisp is a functional language only according to
>the former.)
>--
>file-error; Data: (Opening input file no such file or directory 
>~/.signature)
>_______________________________________________
>Help-gnu-emacs mailing list
>Help-gnu-emacs@gnu.org
>http://mail.gnu.org/mailman/listinfo/help-gnu-emacs


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-04-26  1:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-25 15:15 Exception Handling in LISP Bruce Park
  -- strict thread matches above, loose matches on Subject: below --
2003-04-26  1:21 Bruce Park
     [not found] <mailman.5195.1051283788.21513.help-gnu-emacs@gnu.org>
2003-04-25 15:44 ` Jesper Harder
2003-04-25 17:06 ` Kai Großjohann
2003-04-25 11:01 Problem positioning cursor Victor Kirk
2003-04-25 12:27 ` Exception Handling in LISP Gurucharan
     [not found] ` <mailman.5189.1051273202.21513.help-gnu-emacs@gnu.org>
2003-04-25 13:25   ` David Kastrup
2003-04-25 14:10   ` Kai Großjohann

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.