Skip to content

Commit 784abb2

Browse files
authored
Merge pull request #14039 from lovro-bikic/adjust-raise-args-docs
Update Style/RaiseArgs docs
2 parents cf5e382 + 246dee9 commit 784abb2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/rubocop/cop/style/raise_args.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
module RuboCop
44
module Cop
55
module Style
6-
# Checks the args passed to `fail` and `raise`. For exploded
7-
# style (default), it recommends passing the exception class and message
8-
# to `raise`, rather than construct an instance of the error. It will
9-
# still allow passing just a message, or the construction of an error
10-
# with more than one argument.
6+
# Checks the args passed to `fail` and `raise`.
117
#
12-
# The exploded style works identically, but with the addition that it
13-
# will also suggest constructing error objects when the exception is
14-
# passed multiple arguments.
8+
# Exploded style (default) enforces passing the exception class and message
9+
# arguments separately, rather than constructing an instance of the error.
10+
#
11+
# Compact style enforces constructing an error instance.
12+
#
13+
# Both styles allow passing just a message, or an error instance when there is more
14+
# than one argument.
1515
#
1616
# The exploded style has an `AllowedCompactTypes` configuration
1717
# option that takes an `Array` of exception name Strings.

0 commit comments

Comments
 (0)