Category Archives: Ruby Exception Handling

Ruby Exception Handling

Ruby Exception Handling: SyntaxError

Today we continue our in-depth Ruby Exception Handling series with a dive into the SyntaxError exception class. SyntaxError is a subclass descendant of the ScriptError superclass, and pops up anytime Ruby attempts to execute invalid code syntax. In this piece we’ll examine the SyntaxError class, looking at exactly where it fits into Ruby’s Exception class hierarchy, how to deal with SyntaxErrors, and the… continue reading →

Ruby Exception Handling

Ruby Exception Handling: LoadError

Chugging right along through our Ruby Exception Handling series, our next stop takes us to the LoadError exception class. LoadError is a subclass descendant of the ScriptError superclass, and occurs when Ruby attempts to load a file (via require or otherwise) that simply doesn’t exist. In this post we’ll examine LoadError in a bit more detail, looking at where this exception… continue reading →