[BUGFIX] Exception type matching to satisfy Ruby 2.0