Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between throw/catch and raise/rescue?



What is the difference between throw/catch and raise/rescue?..

Answer / Mansi Sonkar

In Ruby, `raise` is used to create and propagate exceptions. It allows you to define custom exceptions, signal errors, and handle them with `begin`, `rescue`, and `ensure`. On the other hand, `throw` and `catch` are lower-level mechanisms for sending and catching arbitrary values between methods. They are not directly related to exception handling.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby Interview Questions

What are the case statement in ruby?

1 Answers  


what is the difference extend and include?

1 Answers  


what is the purpose of the rakefile available in the demo directory in ruby?

1 Answers  


Explain me what is the difference between symbol and string?

1 Answers  


Explain the three levels of access control for ruby methods?

1 Answers  


List some features of ruby?

1 Answers  


What things we can define in the model?

1 Answers  


How ruby looks up a method to invoke?

1 Answers  


Explain until loop in ruby.

1 Answers  


Explain how Symbol is different from variables?

1 Answers  


Explain the role of modules and mixins in ruby?

1 Answers  


How to use ruby methods.

1 Answers  


Categories