Bird
0
0

Which class is the root of the exception hierarchy in Ruby?

easy📝 Conceptual Q11 of 15
Ruby - Error Handling

Which class is the root of the exception hierarchy in Ruby?

ARuntimeError
BStandardError
CException
DIOError
Step-by-Step Solution
Solution:
  1. Step 1: Understand Ruby's exception hierarchy

    In Ruby, all exceptions inherit from the Exception class, which is the root of the hierarchy.
  2. Step 2: Identify the root class

    Other exception classes like StandardError and RuntimeError are subclasses of Exception.
  3. Final Answer:

    Exception -> Option C
  4. Quick Check:

    Root exception class = Exception [OK]
Quick Trick: Remember: all errors come from Exception root [OK]
Common Mistakes:
  • Confusing StandardError as root
  • Thinking RuntimeError is root
  • Choosing specific error classes instead of root

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Ruby Quizzes