Class: Potluck::PostgresError

Inherits:
ServiceError
  • Object
show all
Defined in:
lib/potluck/postgres.rb

Overview

Error class used to wrap errors encountered while connecting to or setting up a database.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, wrapped_error = nil) ⇒ PostgresError

Creates a new instance.

  • message - Error message.

  • wrapped_error - Original error that was rescued and is being wrapped by this one (optional).



20
21
22
23
24
# File 'lib/potluck/postgres.rb', line 20

def initialize(message, wrapped_error = nil)
  super(message)

  @wrapped_error = wrapped_error
end

Instance Attribute Details

#wrapped_errorObject (readonly)

Returns the value of attribute wrapped_error.



12
13
14
# File 'lib/potluck/postgres.rb', line 12

def wrapped_error
  @wrapped_error
end