Throw, Catch, Raise, Rescue – I’m So Confused!

3 · Avdi Grimm · Nov. 30, 2021, 11:43 p.m.
One of the aspects of Ruby that often confuses newbies coming from other languages is the fact that it has both throw and catch and raise and rescue statements. In this article I’ll try and clear up that confusion. If you’re familiar with Java, C#, PHP, or C++, you are probably used to using try, catch, and throw for exception handling. You use try to delineate the block in […]...