diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e9b058151..afaf3ef11 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -62,7 +62,7 @@ class ApplicationController < ActionController::Base end # Some exceptions - class RenderEmpty < Exception; end + class RenderEmpty < StandardError; end # Render nothing rescue_from RenderEmpty do @@ -121,7 +121,7 @@ class ApplicationController < ActionController::Base end end - class PluginDisabled < Exception; end + class PluginDisabled < StandardError; end # If a controller requires a plugin, it will raise an exception if that plugin is # disabled. This allows plugins to be disabled programatically. diff --git a/app/jobs/base.rb b/app/jobs/base.rb index bd9f66c86..2f7f68002 100644 --- a/app/jobs/base.rb +++ b/app/jobs/base.rb @@ -186,7 +186,7 @@ module Jobs end - class HandledExceptionWrapper < Exception + class HandledExceptionWrapper < StandardError attr_accessor :wrapped def initialize(ex) super("Wrapped #{ex.class}: #{ex.message}") diff --git a/app/jobs/regular/crawl_topic_link.rb b/app/jobs/regular/crawl_topic_link.rb index 6c0bf6a91..fa64abffa 100644 --- a/app/jobs/regular/crawl_topic_link.rb +++ b/app/jobs/regular/crawl_topic_link.rb @@ -5,7 +5,7 @@ require 'excon' module Jobs class CrawlTopicLink < Jobs::Base - class ReadEnough < Exception; end + class ReadEnough < StandardError; end # Retrieve a header regardless of case sensitivity def self.header_for(head, name) diff --git a/lib/autospec/qunit_runner.rb b/lib/autospec/qunit_runner.rb index 3dae8a2f2..06d3e2362 100644 --- a/lib/autospec/qunit_runner.rb +++ b/lib/autospec/qunit_runner.rb @@ -24,7 +24,7 @@ module Autospec require "socket" - class PhantomJsNotInstalled < Exception; end + class PhantomJsNotInstalled < StandardError; end def initialize ensure_phantomjs_is_installed diff --git a/lib/rate_limiter/limit_exceeded.rb b/lib/rate_limiter/limit_exceeded.rb index ca6025f8e..2b85b467b 100644 --- a/lib/rate_limiter/limit_exceeded.rb +++ b/lib/rate_limiter/limit_exceeded.rb @@ -1,7 +1,7 @@ class RateLimiter # A rate limit has been exceeded. - class LimitExceeded < Exception + class LimitExceeded < StandardError attr_accessor :available_in def initialize(available_in) @available_in = available_in