On 8/3/05, BTrout@xxxxxxxxxxxx <BTrout@xxxxxxxxxxxx> wrote:
> Where can I find good help on error handling.
Not sure, other than the Pickaxe.
> I have this message ... and I don't understand what the rescue
> syntax would be for it:
>
> ...
> /usr/lib/ruby/1.8/net/sftp/operations/abstract.rb:78:in
> `do_status': Net::SFTP::Operations::StatusException
> (2, "No such file")
> (Net::SFTP::Operations::StatusException (2, "No such
> file"))
[...]
That item in parenthesis (Net::SFTP::Operations::StatusException)
would be the exception to rescue, e.g.:
begin
...
rescue Net::SFTP::Operations::StatusException => se
...
end
What you *do* with that is up to you entirely, and may depend on
what StatusException gives you to investigate its cause (which seems
likely, since it reports a status 2 and a message "No such file") so
that you can react to the various statuses.
-austin
--
Austin Ziegler * halostatue@xxxxxxxxx
* Alternate: austin@xxxxxxxxxxxxx
|