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

Why Ruby is known as a language of flexibility?

1 Answers  


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

1 Answers  


In how many ways you can compare Ruby string?

1 Answers  


How to write multiline string in Ruby?

1 Answers  


Tell me how do you remove nil values in array using ruby?

1 Answers  


How is an iterator handled in ruby?

1 Answers  


What is a symbol in ruby?

1 Answers  


What is concatenating string in Ruby?

1 Answers  


How would you implement hash in ruby internally?

1 Answers  


Explain module mixins in Ruby?

1 Answers  


How ruby looks up a method to invoke?

1 Answers  


How is object methods defined in ruby?

1 Answers  


Categories