Inherit errors from StandardError instead of Exception.

This commit is contained in:
evazion
2020-01-11 19:07:28 -06:00
parent aff3d3b18f
commit 153a8339ab
27 changed files with 35 additions and 32 deletions

View File

@@ -3,7 +3,7 @@ require 'resolv'
module Downloads
class File
include ActiveModel::Validations
class Error < Exception; end
class Error < StandardError; end
RETRIABLE_ERRORS = [Errno::ECONNRESET, Errno::ETIMEDOUT, Errno::EIO, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, Timeout::Error, IOError]

View File

@@ -1,5 +1,5 @@
module PaginationExtension
class PaginationError < Exception; end
class PaginationError < StandardError; end
attr_accessor :current_page, :records_per_page, :paginator_count, :paginator_mode

View File

@@ -6,7 +6,7 @@ class PawooApiClient
STATUS1 = %r!\Ahttps?://pawoo\.net/web/statuses/(\d+)!
STATUS2 = %r!\Ahttps?://pawoo\.net/@.+?/([^/]+)!
class MissingConfigurationError < Exception; end
class MissingConfigurationError < StandardError; end
class Account
attr_reader :json

View File

@@ -23,7 +23,7 @@ class PixivApiClient
VistaPro Sculptris Comi\ Po! modo DAZ\ Studio 3D-Coat
]
class Error < Exception; end
class Error < StandardError; end
class BadIDError < Error; end
class WorkResponse

View File

@@ -1,4 +1,4 @@
module PostSets
class SearchError < Exception
class SearchError < StandardError
end
end

View File

@@ -1,5 +1,5 @@
module PostSets
class SearchError < Exception
class SearchError < StandardError
end
class WikiPage < PostSets::Post

View File

@@ -1,5 +1,5 @@
class SessionLoader
class AuthenticationFailure < Exception; end
class AuthenticationFailure < StandardError; end
attr_reader :session, :cookies, :request, :params

View File

@@ -1,7 +1,7 @@
class UploadService
class Replacer
extend Memoist
class Error < Exception; end
class Error < StandardError; end
attr_reader :post, :replacement

View File

@@ -1,5 +1,5 @@
class UserDeletion
class ValidationError < Exception; end
class ValidationError < StandardError; end
attr_reader :user, :password