From: Aleksei Guzev Date: 2001-07-05T21:18:22+09:00 Subject: [ruby-talk:17288] Re: Inheritance I have hardware, wich in case of division be zero generates an interrupt. It differentiates integer and float interrrupts. I wish A) process harware exceptions with Ruby's "rescue" ( I've done this ) B) collect hardware exceptions in class MyException C) allow processing of Ruby's ZeroDivisionError and my Int- and Float-DivisionByZero exceptions with single block: rescue ZeroDivisionError. (Not "rescue ZeroDivisionError, IntDivisionByZero, FloatDivisionByZero"!) I require the latter to allow foreign modules (wich do not require my module) handle exception thrown by my hardware. It seems to be useful. The only way I see is declaring my exceptions being ZeroDivisionErrors. But the hardware generates interrupt not only on division by zero, but on overflow and on array boundaries fault etc. A cannot derive MyException from ZeroDivisionError, because not all "hardware" exceptions are caused by division by zero. # -----Original Message----- # From: ts [mailto:decoux@moulon.inra.fr] # Sent: 5 ���� 2001 �. 18:03 # To: ruby-talk ML # Cc: ruby-talk@ruby-lang.org # Subject: [ruby-talk:17287] Re: Inheritance # # # >>>>> "A" == Aleksei Guzev writes: # # A> class IntDivisionByZero: MyException, ZeroDivisionError {} # ^^^^^^^^^^^ # # Why do you need this ? # # # Guy Decoux #