C
Courtland Allen
[Note: parts of this message were removed to make it a legal post.]
Hello,
I've normally handled exceptions by "rescuing functions" in roughly this
manner:
def test_function(args)
puts "blah blah blah"
rescue Exception=>e
puts "blah blah blah: #{args.inspect}"
end
However, I'm using a new IDE now that's giving me a warning about the
reference to "args" in the rescue clause: "Local variable can be
uninitialized." I figured that's impossible, since it's a required argument
to the function. Should I just ignore the warning, or am I actually doing
something wrong? I suppose the alternative would be:
def test_function(args)
begin
puts "blah blah blah"
rescue Exception=>e
puts "blah blah blah: #{args.inspect}"
end
end
Hello,
I've normally handled exceptions by "rescuing functions" in roughly this
manner:
def test_function(args)
puts "blah blah blah"
rescue Exception=>e
puts "blah blah blah: #{args.inspect}"
end
However, I'm using a new IDE now that's giving me a warning about the
reference to "args" in the rescue clause: "Local variable can be
uninitialized." I figured that's impossible, since it's a required argument
to the function. Should I just ignore the warning, or am I actually doing
something wrong? I suppose the alternative would be:
def test_function(args)
begin
puts "blah blah blah"
rescue Exception=>e
puts "blah blah blah: #{args.inspect}"
end
end