Skip to content

"Invalid configuration file, using default options" -- should throw additional debugging information in logs #711

@nitinmohan87

Description

@nitinmohan87

When there is an error in the yard plugin the debug logs shows the following debug logs which is not quite informative.

> yardoc --plugin chef '.' --debug --backtrace
[error]: Invalid configuration file, using default options
[debug]: Parsing ["."] with `ruby` parser
...

This line could at least add the exception message (backtrace would also be great!)

def self.load
      self.options = SymbolHash.new(false)
      options.update(DEFAULT_CONFIG_OPTIONS)
      options.update(read_config_file)
      load_commandline_safemode
      add_ignored_plugins_file
      translate_plugin_names
      load_plugins
    rescue => e
      log.error "Invalid configuration file, using default options"
      log.error e.message
      log.error e.backtrace.inspect
      options.update(DEFAULT_CONFIG_OPTIONS)
    end

The log would look like this

> yardoc --plugin chef '.' --debug --backtrace
[error]: Invalid configuration file, using default options
[error]: undefined method `register' for class `YARD::CodeObjects::Chef::ChefObject'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions