Exception: UsageError

Inherits:
RuntimeError
  • Object
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.

Instance Attribute Summary collapse

Instance Method Summary collapse

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.



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

def initialize(reason = nil)
  super

  @reason = reason
end

Instance Attribute Details

#reasonObject (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.



11
12
13
# File 'exceptions.rb', line 11

def reason
  @reason
end