Search code examples
eiffel

Is the rescue clause being called on descendent redefinition?


Didn't find the answer on this doc, is the rescue clause called when redefining a feature?

Class A

class A

feature -- 

    process
        do
            do_stuff
        rescue
            on_fail
        end
end -- class

Class B

class B

inherit
    A
        redefine
            process
        end

feature -- 

    process
        do
            do_other_stuff -- do I have to call the rescue too?
        end
end -- class

Solution

  • Rescue clauses are not inherited like contracts and should be supplied with every new feature body if needed.