class RuboCop::Cop::Style::RaiseArgs

def check_compact(node)

def check_compact(node)
  if node.arguments.size > 1
    exception = node.first_argument
    return if exception.send_type? && exception.first_argument&.hash_type?
    add_offense(node, message: format(COMPACT_MSG, method: node.method_name)) do |corrector|
      replacement = correction_exploded_to_compact(node)
      corrector.replace(node, replacement)
      opposite_style_detected
    end
  else
    correct_style_detected
  end
end