I have access to ruby’s exception hierarchy (it’s mentioned in both the pickaxe and the hummingbird), but I’m not sure which exception to use because I haven’t found any information on what each of the terms mean.
Does using the right exception class matter?
‘It depends’.
One of the main problems with Ruby is the lack of good specification. It used to be worse, though.
This is mainly a question of style: If your error can be described well with one of the builtin exception classes, use it. If you think a subclass makes sense, use it.
Otherwise, you could consider to follow this lead from a C++ coding standard: