C++, Java, and Ruby exception handling compared
C++ Java Ruby try {} try {} begin/end catch {} catch {} rescue keyword (or catch method) Not applicable finally ensure throw throw raise (or throw method)
1. | rescue's syntax makes handling different exceptions in different ways easy: | ||
2. | how exceptions work in Ruby. | ||
3. | Handling Exceptions: 10 / 0 | ||
4. | Handling Passed Exceptions | ||
5. | begin |