123456789_123456789_123456789_123456789_123456789_

Exception: RuboCop::Plugin::LoadError Private

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::RuboCop::Error, StandardError
Instance Chain:
self, ::RuboCop::Error, StandardError
Inherits: RuboCop::Error
Defined in: lib/rubocop/plugin/load_error.rb

Overview

An exception raised when a plugin fails to load.

Class Method Summary

Instance Method Summary

Constructor Details

.new(plugin_name) ⇒ LoadError

[ GitHub ]

  
# File 'lib/rubocop/plugin/load_error.rb', line 8

def initialize(plugin_name)
  super

  @plugin_name = plugin_name
end

Instance Method Details

#message

[ GitHub ]

  
# File 'lib/rubocop/plugin/load_error.rb', line 14

def message
  <<~MESSAGE
    Failed to load plugin `#{@plugin_name}` because the corresponding plugin class could not be determined for instantiation.
    Try upgrading it first (e.g., `bundle update #{@plugin_name}`).
    If `#{@plugin_name}` is not yet a plugin, use `require: #{@plugin_name}` instead of `plugins: #{@plugin_name}` in your configuration.

    For further assistance, check with the developer regarding the following points:
    https://docs.rubocop.org/rubocop/plugin_migration_guide.html
  MESSAGE
end