I needed this feature and I had to modify the code. So that the script
does not die on errors like "bad hostname" or "cannot connect"... if
you want i will send you the diffs for version 1.25
[dhudes@tcp-ip.info - Tue Feb 10 12:24:26 2004]:
Show quoted text> going thru the code and checking status on open file handles /
sockets
Show quoted text> and so on is certainly something I need to do.
> I will hopefully get to it very soon.
> Rather, get started on it -- I've no idea how long it'll take.
>
>
>
>
> On Tue, 10 Feb 2004, autarch@urth.org via RT wrote:
>
> >
> > This message about Net-SSH-Perl was sent to you by
autarch@urth.org
Show quoted text> <autarch@urth.org> via rt.cpan.org
> >
> > Full context and any attached attachments can be found at:
> > <URL:
https://rt.cpan.org/Ticket/Display.html?id=2675 >
> >
> > On Tue, 10 Feb 2004, via RT wrote:
> >
> > > > Details:
> > > > Distributions: Net-SSH-Perl-1.23
> > > > Perl Version : v5.6.1 built for i386-linux
> > > > OS: Linux xxx 2.4.18-27.7.x #1 Fri Mar 14 06:44:53 EST 2003
i686
Show quoted text> > > > unknown
> > > >
> > > > Problem:
> > > > If the connection fails because of any reason, the script
dies,
Show quoted text> where
> > > > as it should report the error and allow the error to be
handled
Show quoted text> by the
> > > > calling module.
> > >
> > > Sorry, no. In case of an error in which it cannot proceed the
> module
> > > must die. If you want to catch the error use eval().
> > > Maybe in future some use of the Exception module might be made
but
Show quoted text> this
> > > is low priority.
> >
> > What we really need is _consistent_ error handling. Some methods
> may die,
> > others do nothing and return no status. If _everything_ were
> guaranteed
> > to die with an error message string on failure, at least users
could
Show quoted text> wrap
> > all calls in eval{}. I'm also considering doing something like
DBI
Show quoted text> and
> > offering a choice between throwing an exception and setting a
> message that
> > can be retrieved via $ssh->error.
> >
> > Dana, let's talk more about this on the mailing list.
> >
> >
> > -dave
> >
> > /*=======================
> > House Absolute Consulting
> > www.houseabsolute.com
> > =======================*/
> >