After the last rescue clause, guarantee contains a block of code that is always executed when the block ends. The assure block will be executed regardless of whether the block departs normally, raises and rescues an exception, or is terminated by an uncaught exception.
The ensure statement is a safety net for developers who want to make sure that a variable is not null or undefined.
Share a personalized message with your friends.