Skip to content

Commit d872d52

Browse files
committed
appease Lint/InheritException
1 parent 6b26c03 commit d872d52

4 files changed

Lines changed: 4 additions & 13 deletions

File tree

.rubocop_todo.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,6 @@ Lint/IneffectiveAccessModifier:
4949
- 'lib/mongo/protocol/message.rb'
5050
- 'lib/mongo/uri/options_mapper.rb'
5151

52-
# Offense count: 4
53-
# This cop supports unsafe autocorrection (--autocorrect-all).
54-
# Configuration parameters: EnforcedStyle.
55-
# SupportedStyles: standard_error, runtime_error
56-
Lint/InheritException:
57-
Exclude:
58-
- 'lib/mongo/error/raise_original_error.rb'
59-
- 'spec/mongo/server/connection_spec.rb'
60-
- 'spec/mongo/socket_spec.rb'
6152

6253
# Offense count: 31
6354
# Configuration parameters: AllowedParentClasses.

lib/mongo/error/raise_original_error.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Error
2424
# @note This class must not derive from Error.
2525
#
2626
# @api private
27-
class RaiseOriginalError < Exception
27+
class RaiseOriginalError < Exception # rubocop:disable Lint/InheritException
2828
end
2929
end
3030
end

spec/mongo/server/connection_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
require 'spec_helper'
44

5-
class ConnectionSpecTestException < Exception; end
5+
class ConnectionSpecTestException < StandardError; end
66

77
# fails intermittently in evergreen
88
describe Mongo::Server::Connection do

spec/mongo/socket_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696

9797
context 'with WaitReadable' do
9898
let(:exception_class) do
99-
Class.new(Exception) do
99+
Class.new(StandardError) do
100100
include IO::WaitReadable
101101
end
102102
end
@@ -106,7 +106,7 @@
106106

107107
context 'with WaitWritable' do
108108
let(:exception_class) do
109-
Class.new(Exception) do
109+
Class.new(StandardError) do
110110
include IO::WaitWritable
111111
end
112112
end

0 commit comments

Comments
 (0)