Q. What is the recommended approach for handling exceptions in Ruby?

  • (A) Suppress exceptions by using ignore blocks
  • (B) Use exit to terminate the program when an exception occurs
  • (C) Let exceptions propagate without handling them
  • (D) Use begin and rescue blocks to gracefully handle exceptions
πŸ’¬ Discuss
βœ… Correct Answer: (D) Use begin and rescue blocks to gracefully handle exceptions

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
183
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
89%
Success Rate