Error Handling in Ruby: Part II

Mehdi Farsi
Aug 15, 2018 · 2 min read

The retry keyword

retry #1
retry #2
retry #3
irb> retry
SyntaxError: Invalid retry

Custom errors

PolicyError: access not granted
UserPolicyError: user unauthorized
TypeError (exception class/object expected)

May I have your attention please 🎤🎤

Feel free to subscribe here: www.rubycademy.com


rubycademy

E-Learning platform for Ruby and Ruby on Rails

Mehdi Farsi

Written by

Founder of www.rubycademy.com — I blog about Ruby & ROR - Paris

rubycademy

E-Learning platform for Ruby and Ruby on Rails