unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Process filter error in copy-file and error handling
@ 2007-08-04 10:50 Lennart Borgman (gmail)
       [not found] ` <E1IHWR8-0004U0-6x@fencepost.gnu.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2007-08-04 10:50 UTC (permalink / raw)
  To: Emacs Devel

I got an error in copy-file because a remote directory did not exist. 
Emacs then (a bit to my surprise) continued with the next statement 
after copy-file. However if I turn on debug-on-error I get a backtrace 
(as expected).

Am I supposed to do something special in my code to stop executing after 
the error? Or is it a bug?

Here is (a simplified version of) my code:

   (defun my-upload-file(filename)
     (copy-file local-file
               (html-site-current-local-to-remote filename nil)
                0)
     (message "Upload ready"))

and here is what I get in the message buffer:

   Doing CD... [12 times]
   Copying myimg.jpg to /ftp:myacc@ftp.myhost.com:/htdocs/img/... [2 times]
   error in process filter: ange-ftp-cf2: Opening output file: FTP 
Error: "550 /htdocs/img/myimg.jpg: No such file or directory", 
/ftp:myacc@ftp.myhost.com:/htdocs/img/myimg.jpg
   error in process filter: Opening output file: FTP Error: "550 
/htdocs/img/myimg.jpg: No such file or directory", 
/ftp:myacc@ftp.myhost.com:/htdocs/img/myimg.jpg
   Upload ready

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

* Re: Process filter error in copy-file and error handling
       [not found] ` <E1IHWR8-0004U0-6x@fencepost.gnu.org>
@ 2007-08-06  7:29   ` Michael Albinus
  2007-08-06 16:33     ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Albinus @ 2007-08-06  7:29 UTC (permalink / raw)
  To: rms; +Cc: Lennart Borgman (gmail), emacs-devel

Richard Stallman <rms@gnu.org> writes:

> The bug is that the error occurs in a filter, where it is caught.  The
> actual file handler needs to signal an error, which will stop
> execution of your function.
>
> So I think this is a bug in Tramp.

Not in Tramp. ange-ftp has been changed, so that errors are raised on
another place (in ange-ftp-process-filter now), compared with the
version shipped with Emacs 21.

> Michael, would you please fix this and ack?
> Please put the fix in Emacs 22 if the bug is present there.

Should be fixed now in both the trunk and EMACS_22_BASE.

Best regards, Michael.

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

* Re: Process filter error in copy-file and error handling
  2007-08-06  7:29   ` Michael Albinus
@ 2007-08-06 16:33     ` Richard Stallman
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2007-08-06 16:33 UTC (permalink / raw)
  To: Michael Albinus; +Cc: lennart.borgman, emacs-devel

Thanks for fixing it.

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

end of thread, other threads:[~2007-08-06 16:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-04 10:50 Process filter error in copy-file and error handling Lennart Borgman (gmail)
     [not found] ` <E1IHWR8-0004U0-6x@fencepost.gnu.org>
2007-08-06  7:29   ` Michael Albinus
2007-08-06 16:33     ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).