Ask a Question related to Ruby, Design and Development.
-
Nigel Gilbert #1
More error backtrace
I am having trouble tracking down the point at which my program is
failing. I have a backtrace that looks like this:
/usr/local/lib/ruby/1.6/net/protocol.rb:468:in `new': wrong argument
type nil (expected String) (TypeError)
from /usr/local/lib/ruby/1.6/net/protocol.rb:468:in `connect'
from /usr/local/lib/ruby/1.6/net/protocol.rb:467:in `timeout'
from /usr/local/lib/ruby/1.6/net/protocol.rb:467:in `connect'
from /usr/local/lib/ruby/1.6/net/protocol.rb:449:in `initialize'
from /usr/local/lib/ruby/1.6/net/protocol.rb:149:in `new'
from /usr/local/lib/ruby/1.6/net/protocol.rb:149:in
`conn_socket'
from /usr/local/lib/ruby/1.6/net/http.rb:499:in `do_start'
from /usr/local/lib/ruby/1.6/net/protocol.rb:131:in `start'
... 6 levels...
from webcount.rb:556:in `each'
from webcount.rb:556:in `wayback'
from webcount.rb:703:in `dosite'
from webcount.rb:813
What I need to know are which lines of code are represented by "... 6
levels...". Is there any way of stopping ruby from abbreviating the
backtrace like this?
(I'm using ruby 1.6.8 (2002-12-24) [powerpc-darwin6.6])
Thanks
Nigel
Nigel Gilbert Guest
-
#40765 [NEW]: calling backtrace inside nested static class functions causes segfault
From: ndroege at bimp dot de Operating system: linux debian PHP version: 5.2.1 PHP Bug Type: Reproducible crash Bug... -
Error 403 Failed to read heders Error for long-runningCFMAIL and CFINDEX command
I have two different pages with long-running scripts on which I am recieving the following error: Error - 403 Failed to read headers to server:... -
Error Creating Control: Parser Error DocHeader does not have a property named 'cc3:MyItems'
I am having problems getting this webcontrol working properly. Everything else works fine except having items. So here is the low-down on the... -
exception backtrace for ruby/tk programs
Hello, I suffered with really hard debugging sessions when an unexpected exception was thrown from a ruby callback in a ruby/tk application, as... -
An error occurred while try to load the string resources (GetModuleHandle failed with error -2147023888)
Hello, on one of our customers servers we get following error on first ASPX-page: An error occurred while try to load the string resources... -
Gennady #2
Re: More error backtrace
It is the default exception handling in Ruby. You can always embrace your
program
in
begin
...
rescure Exception => exception
p exception.message
p exception.backtrace # or present it in any other way you like
end
Gennady
----- Original Message -----
From: "Nigel Gilbert" <n.gilbert@soc.surrey.ac.uk>
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Wednesday, July 02, 2003 2:43 PM
Subject: More error backtrace
> I am having trouble tracking down the point at which my program is
> failing. I have a backtrace that looks like this:
>
> /usr/local/lib/ruby/1.6/net/protocol.rb:468:in `new': wrong argument
> type nil (expected String) (TypeError)
> from /usr/local/lib/ruby/1.6/net/protocol.rb:468:in `connect'
> from /usr/local/lib/ruby/1.6/net/protocol.rb:467:in `timeout'
> from /usr/local/lib/ruby/1.6/net/protocol.rb:467:in `connect'
> from /usr/local/lib/ruby/1.6/net/protocol.rb:449:in `initialize'
> from /usr/local/lib/ruby/1.6/net/protocol.rb:149:in `new'
> from /usr/local/lib/ruby/1.6/net/protocol.rb:149:in
> `conn_socket'
> from /usr/local/lib/ruby/1.6/net/http.rb:499:in `do_start'
> from /usr/local/lib/ruby/1.6/net/protocol.rb:131:in `start'
> ... 6 levels...
> from webcount.rb:556:in `each'
> from webcount.rb:556:in `wayback'
> from webcount.rb:703:in `dosite'
> from webcount.rb:813
>
> What I need to know are which lines of code are represented by "... 6
> levels...". Is there any way of stopping ruby from abbreviating the
> backtrace like this?
>
> (I'm using ruby 1.6.8 (2002-12-24) [powerpc-darwin6.6])
>
> Thanks
>
> Nigel
>
>
>
Gennady Guest
-
Simon Strandgaard #3
Re: More error backtrace
On Thu, 03 Jul 2003 07:43:03 +0900, Nigel Gilbert wrote:
You will need to catch ALL exceptions yourself... like this:> What I need to know are which lines of code are represented by "... 6
> levels...". Is there any way of stopping ruby from abbreviating the
> backtrace like this?
Fatal-Error in program!> ruby x.rb
please report this bug.
EXCEPTION:
RuntimeError
MESSAGE:
hello world
BACKTRACE:
x.rb:2
>begin> cat x.rb
raise "hello world"
rescue Exception => e
puts <<MSG
Fatal-Error in program!
please report this bug.
EXCEPTION:
\t#{e.class.to_s}
MESSAGE:
\t#{e.message}
BACKTRACE:
#{e.backtrace.map{|t|"\t#{t}\n"}.join}
MSG
end>
--
Simon Strandgaard
Simon Strandgaard Guest



Reply With Quote

