Exception: UsageError
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 ⇒ Object readonly internal
Instance Method Summary collapse
-
#initialize(reason = nil) ⇒ UsageError
constructor
internal
A new instance of UsageError.
Constructor Details
#initialize(reason = nil) ⇒ UsageError
This method is part of an internal API. This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
Returns a new instance of UsageError.
10 11 12 13 14 |
# File 'exceptions.rb', line 10 def initialize(reason = nil) super @reason = reason end |
Instance Attribute Details
#reason ⇒ Object (readonly)
This method is part of an internal API. This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
8 9 10 |
# File 'exceptions.rb', line 8 def reason @reason end |