0001-Custom-Exception-classes-should-inherit-StandardErro.patch

Go MAEDA, 2019-05-20 13:44

Download (3.78 KB)

View differences:

app/controllers/application_controller.rb
20 20
require 'uri'
21 21
require 'cgi'
22 22

  
23
class Unauthorized < Exception; end
23
class Unauthorized < StandardError; end
24 24

  
25 25
class ApplicationController < ActionController::Base
26 26
  include Redmine::I18n
app/controllers/repositories_controller.rb
20 20
require 'digest/sha1'
21 21
require 'redmine/scm/adapters'
22 22

  
23
class ChangesetNotFound < Exception; end
24
class InvalidRevisionParam < Exception; end
23
class ChangesetNotFound < StandardError; end
24
class InvalidRevisionParam < StandardError; end
25 25

  
26 26
class RepositoriesController < ApplicationController
27 27
  menu_item :repository
app/models/auth_source.rb
19 19

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

  
25 25
class AuthSource < ActiveRecord::Base
app/models/repository.rb
17 17
# along with this program; if not, write to the Free Software
18 18
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 19

  
20
class ScmFetchError < Exception; end
20
class ScmFetchError < StandardError; end
21 21

  
22 22
class Repository < ActiveRecord::Base
23 23
  include Redmine::Ciphering
lib/redmine/default_data/loader.rb
19 19

  
20 20
module Redmine
21 21
  module DefaultData
22
    class DataAlreadyLoaded < Exception; end
22
    class DataAlreadyLoaded < StandardError; end
23 23

  
24 24
    module Loader
25 25
      include Redmine::I18n
lib/redmine/helpers/gantt.rb
21 21
  module Helpers
22 22
    # Simple class to handle gantt chart data
23 23
    class Gantt
24
      class MaxLinesLimitReached < Exception
24
      class MaxLinesLimitReached < StandardError
25 25
      end
26 26

  
27 27
      include ERB::Util
lib/redmine/wiki_formatting.rb
21 21

  
22 22
module Redmine
23 23
  module WikiFormatting
24
    class StaleSectionError < Exception; end
24
    class StaleSectionError < StandardError; end
25 25

  
26 26
    @@formatters = {}
27 27

  
28
-