Exceptions available in Ruby on Rails

Hi,

Can anybody list out what are all the exceptions available in ROR?

Thanks in advance…

Karthik.

Karthi kn wrote:

Hi,

Can anybody list out what are all the exceptions available in ROR?

Thanks in advance…

Karthik.

That’s a pretty open question.

What specifically do you need to know?

That’s a pretty open question.

What specifically do you need to know?

There is a class hierarchy in JAVA to see all the possible exceptions
that can occur. Just like that, can I find what are all the possible
exceptions that can occur in ROR. I need to list out all the exception
names.

Well you can do
all_exceptions = []
ObjectSpace.each_object(Class) do |k|
all_exceptions << k if k.ancestors.include?(Exception)
end

Fred

I think that’s what I wanted. Thanks a lot Fred.

On 1 Jul 2008, at 08:08, Karthi kn wrote:

That’s a pretty open question.

What specifically do you need to know?

There is a class hierarchy in JAVA to see all the possible exceptions
that can occur. Just like that, can I find what are all the possible
exceptions that can occur in ROR. I need to list out all the exception
names.

Well you can do
all_exceptions = []
ObjectSpace.each_object(Class) do |k|
all_exceptions << k if k.ancestors.include?(Exception)
end

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs