Exception: Pvectl::Error

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

Overview

Base error class for all pvectl-specific exceptions.

All custom errors in the application should inherit from this class, which allows for easy catching of all pvectl errors.

Examples:

Creating a custom error

class ConnectionError < Pvectl::Error; end

Catching pvectl errors

begin
  # pvectl operations
rescue Pvectl::Error => e
  puts "pvectl error: #{e.message}"
end