Exception: Vmstator::VmstatError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/vmstator/errors.rb

Overview

VmstatError handles the custom error handling for this Gem

Example

# Typical use case
raise VmstatError("This is a custom error!")

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(problem = "Vmstat eems to have encountered a problem.") ⇒ VmstatError

Returns a new instance of VmstatError.



12
13
14
15
# File 'lib/vmstator/errors.rb', line 12

def initialize(problem="Vmstat eems to have encountered a problem.")
  @problem = problem
  super(@problem)
end

Instance Attribute Details

#problemObject (readonly)

Returns the value of attribute problem.



11
12
13
# File 'lib/vmstator/errors.rb', line 11

def problem
  @problem
end