Ruby Exceptions!
Hierarch and usage
NoMemoryError!
NoMemoryErrorRaised whenmemoryallocation fails.
ScriptError!
ScriptErrorSuperclass for errorsraised when a script cannot be executed
ScriptErrorHierarch
LoadErrorRaised when a filerequired fails to load
NotImplementedErrorRaised when afeature is notimplemented on thecurrent platform
SyntaxErrorRaised whenencountering Rubycode with an invalidsyntax
SignalException!SignalException!
Raised when asignal isreceivedSignalException
SignalExceptionHierarch
InterruptRaised with the interruptsignal is received, typicallybecause the user pressed onControl-C
StandardError!
StandardErrorThe most standard error typesare subclasses ofStandardError
StandardErrorHierarch
ArgumentErrorRaised when thearguments arewrong
IndexErrorRaised when thegiven index isinvalid.
StopIteration < IndexErrorRaised to stop theiteration, inparticular byEnumerator#next
IOErrorRaised when an IOoperation fails.
EOFError < IOErrorRaised by some IOoperations whenreaching the end offile, nil for example
LocalJumpErrorRaised when Rubycant yield asrequested
NameErrorRaised when a givenname is invalid orundefined
NoMethodError < NameErrorRaised when amethod is called on areceiver whichdoesnt have itdefined
RangeErrorRaised when a givennumerical value isout of range
FloatDomainError < RangeErrorRaised whenattempting toconvert special floatvalues
RegexpErrorRaised when givenan invalid regexpexpression.
RuntimeError *default for raiseA generic error classraised when aninvalid operation isattempted.
SecurityErrorRaised whenattempting a potentialunsafe operation,typically when the$SAFE level is raisedabove 0.
SystemCallErrorSystemCallError is thebase class for all low-level platform-dependent errors.
SystemStackErrorRaised in case of astack overflow.
ThreadErrorRaised when aninvalid operation isattempted on athread.
TypeErrorRaised whenencountering anobject that is not ofthe expected type.
ZeroDivisionErrorRaised whenattempting to dividean integer by 0
SystemExit!
Raised by exit toinitiate thetermination of thescript.
fatal – impossible torescue!
Thanks
@johalfjohalffarina@gmail.com
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Ruby exceptions
Upcoming SlideShare
Loading in …5
×

Ruby exceptions

251 views
184 views

Published on

A little presentation about Ruby Exceptions.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
251
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Ruby exceptions

  1. 1. Ruby Exceptions!
  2. 2. Hierarch and usage
  3. 3. NoMemoryError!
  4. 4. NoMemoryErrorRaised whenmemoryallocation fails.
  5. 5. ScriptError!
  6. 6. ScriptErrorSuperclass for errorsraised when a script cannot be executed
  7. 7. ScriptErrorHierarch
  8. 8. LoadErrorRaised when a filerequired fails to load
  9. 9. NotImplementedErrorRaised when afeature is notimplemented on thecurrent platform
  10. 10. SyntaxErrorRaised whenencountering Rubycode with an invalidsyntax
  11. 11. SignalException!SignalException!
  12. 12. Raised when asignal isreceivedSignalException
  13. 13. SignalExceptionHierarch
  14. 14. InterruptRaised with the interruptsignal is received, typicallybecause the user pressed onControl-C
  15. 15. StandardError!
  16. 16. StandardErrorThe most standard error typesare subclasses ofStandardError
  17. 17. StandardErrorHierarch
  18. 18. ArgumentErrorRaised when thearguments arewrong
  19. 19. IndexErrorRaised when thegiven index isinvalid.
  20. 20. StopIteration < IndexErrorRaised to stop theiteration, inparticular byEnumerator#next
  21. 21. IOErrorRaised when an IOoperation fails.
  22. 22. EOFError < IOErrorRaised by some IOoperations whenreaching the end offile, nil for example
  23. 23. LocalJumpErrorRaised when Rubycant yield asrequested
  24. 24. NameErrorRaised when a givenname is invalid orundefined
  25. 25. NoMethodError < NameErrorRaised when amethod is called on areceiver whichdoesnt have itdefined
  26. 26. RangeErrorRaised when a givennumerical value isout of range
  27. 27. FloatDomainError < RangeErrorRaised whenattempting toconvert special floatvalues
  28. 28. RegexpErrorRaised when givenan invalid regexpexpression.
  29. 29. RuntimeError *default for raiseA generic error classraised when aninvalid operation isattempted.
  30. 30. SecurityErrorRaised whenattempting a potentialunsafe operation,typically when the$SAFE level is raisedabove 0.
  31. 31. SystemCallErrorSystemCallError is thebase class for all low-level platform-dependent errors.
  32. 32. SystemStackErrorRaised in case of astack overflow.
  33. 33. ThreadErrorRaised when aninvalid operation isattempted on athread.
  34. 34. TypeErrorRaised whenencountering anobject that is not ofthe expected type.
  35. 35. ZeroDivisionErrorRaised whenattempting to dividean integer by 0
  36. 36. SystemExit!
  37. 37. Raised by exit toinitiate thetermination of thescript.
  38. 38. fatal – impossible torescue!
  39. 39. Thanks
  40. 40. @johalfjohalffarina@gmail.com

×