Spec-Zone.ru › Homebrew

Exception: UsageError

Inherits:
RuntimeError
  • Object
  • RuntimeError
  • UsageError
show all
Defined in:
exceptions.rb

Overview

This class is part of an internal API. This class may only be used internally in repositories owned by Homebrew, except in casks or formulae. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Raised when a command is used wrong.

Direct Known Subclasses

FormulaOrCaskUnspecifiedError, FormulaUnspecifiedError, Homebrew::CLI::InvalidConstraintError, Homebrew::CLI::MaxNamedArgumentsError, Homebrew::CLI::MinNamedArgumentsError, Homebrew::CLI::NumberOfNamedArgumentsError, Homebrew::CLI::OptionConflictError, Homebrew::CLI::OptionConstraintError, KegUnspecifiedError

Instance Attribute Summary collapse

  • #reason ⇒ String? readonly private

Instance Method Summary collapse

  • #initialize(reason = nil) ⇒ void constructor private

Constructor Details

#initialize(reason = nil) ⇒ void

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.

Parameters:

  • reason (String, nil) (defaults to: nil)


17
18
19
20
21
# File 'exceptions.rb', line 17

def initialize(reason = nil)
  super

  @reason = reason
end

Instance Attribute Details

#reason ⇒ String? (readonly)

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:

  • (String, nil)


14
15
16
# File 'exceptions.rb', line 14

def reason
  @reason
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/UsageError.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API