cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: two different error codes,

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Wed, 29 Sep 2010 00:21:59 -0700

On Wed, Sep 29, 2010 at 12:38:41PM +0530, Pavan Kumar Kakunoori wrote:
> Hello Team, When the application is into error state, where if the file is not
> found, we observed a vague behaviour. The cURL lib is returning two distinct
> error codes depending on if application is using ftp or sftp. for example if
> application is using ftp the lib is returning error code as
> CURLE_FTP_COULDNT_RETR_FILE and if application is using sftp the lib is
> returning error code as CURLE_REMOTE_FILE_NOT_FOUND. Why is this
> descrimination? why cant lib through one error code?

ftp transfers will also return CURLE_REMOTE_FILE_NOT_FOUND in some cases,
and sftp will return CURLE_REMOTE_ACCESS_DENIED in other cases. It
just depends on which error code is returned by the server and in which
state the problem occurred.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-09-29