Exception: GitHub::API::ValidationFailedError Private

Inherits:
Error
  • Object
show all
Defined in:
utils/github/api.rb

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Error when the API returns a validation error.

Instance Attribute Summary

Attributes inherited from Error

#github_message

Instance Method Summary collapse

Constructor Details

#initialize(github_message, errors) ⇒ ValidationFailedError

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns a new instance of ValidationFailedError.



119
120
121
122
123
124
125
126
127
# File 'utils/github/api.rb', line 119

def initialize(github_message, errors)
  @github_message = if errors.empty?
    github_message
  else
    "#{github_message}: #{errors}"
  end

  super(@github_message)
end