ClearMyBench
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Ruby basics (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Ruby basics
#4559
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 11 Months ago Karma: 0  
The catch defines a block that is labeled with the given name (which may be a Symbol or a String).

The block is executed normally until a throw is encountered.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4560
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 11 Months ago Karma: 0  
Ruby's standard classes and modules raise exceptions. All the exception classes form a hierarchy, with the class Exception at the top.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4561
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 11 Months ago Karma: 0  
Ruby's standard classes and modules raise exceptions.

All the exception classes form a hierarchy, with the class Exception at the top.

The next level contains seven different types:

Interrupt

NoMemoryError

SignalException
ScriptError

StandardError
SystemExit
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4562
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 11 Months ago Karma: 0  
There is one other exception at this level, Fatal, but the Ruby interpreter only uses this internally
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4563
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 11 Months ago Karma: 0  
Both ScriptError and StandardError have a number of subclasses.

The important thing is that if we create our own exception classes, they need to be subclasses of either class Exception or one of its descendants
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#4564
ShriNi (User)
Software Techie (PEGA) currently on a Career Break
Platinum Boarder
Posts: 4000
graph
User Offline Click here to see the profile of this user
Gender: Female Location: Secundrabad India Birthdate: 1983-09-29
Re:Ruby basics 3 Years, 11 Months ago Karma: 0  
FileSaveError.new($!).

We call raise to signal that an exception has occurred, passing it a new instance of FileSaveError, with the reason being that specific

exception caused the writing of the data to fail
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
logo footer   Copyright 2009 - 2013 HotRecruiter.Com - All Rights Reserved