Browse Source

Custom Exception classes should inherit StandardError instead of Exception (#31387).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18187 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.1.0
Go MAEDA 5 years ago
parent
commit
6d6ea928c8

+ 1
- 1
app/controllers/application_controller.rb View File

@@ -20,7 +20,7 @@
require 'uri'
require 'cgi'

class Unauthorized < Exception; end
class Unauthorized < StandardError; end

class ApplicationController < ActionController::Base
include Redmine::I18n

+ 2
- 2
app/controllers/repositories_controller.rb View File

@@ -20,8 +20,8 @@
require 'digest/sha1'
require 'redmine/scm/adapters'

class ChangesetNotFound < Exception; end
class InvalidRevisionParam < Exception; end
class ChangesetNotFound < StandardError; end
class InvalidRevisionParam < StandardError; end

class RepositoriesController < ApplicationController
menu_item :repository

+ 1
- 1
app/models/auth_source.rb View File

@@ -19,7 +19,7 @@

# Generic exception for when the AuthSource can not be reached
# (eg. can not connect to the LDAP)
class AuthSourceException < Exception; end
class AuthSourceException < StandardError; end
class AuthSourceTimeoutException < AuthSourceException; end

class AuthSource < ActiveRecord::Base

+ 1
- 1
app/models/repository.rb View File

@@ -17,7 +17,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

class ScmFetchError < Exception; end
class ScmFetchError < StandardError; end

class Repository < ActiveRecord::Base
include Redmine::Ciphering

+ 1
- 1
lib/redmine/default_data/loader.rb View File

@@ -19,7 +19,7 @@

module Redmine
module DefaultData
class DataAlreadyLoaded < Exception; end
class DataAlreadyLoaded < StandardError; end

module Loader
include Redmine::I18n

+ 1
- 1
lib/redmine/helpers/gantt.rb View File

@@ -21,7 +21,7 @@ module Redmine
module Helpers
# Simple class to handle gantt chart data
class Gantt
class MaxLinesLimitReached < Exception
class MaxLinesLimitReached < StandardError
end

include ERB::Util

+ 1
- 1
lib/redmine/wiki_formatting.rb View File

@@ -21,7 +21,7 @@ require 'digest/md5'

module Redmine
module WikiFormatting
class StaleSectionError < Exception; end
class StaleSectionError < StandardError; end

@@formatters = {}


Loading…
Cancel
Save