Exception: Asimov::FileCannotBeOpenedError

Inherits:
FileDataError show all
Defined in:
lib/asimov/error.rb

Overview

Error that occurs when a local file cannot be opened.

Instance Method Summary collapse

Constructor Details

#initialize(file_name, system_message) ⇒ FileCannotBeOpenedError

Returns a new instance of FileCannotBeOpenedError.



106
107
108
109
110
# File 'lib/asimov/error.rb', line 106

def initialize(file_name, system_message)
  super()
  @file_name = file_name
  @system_message = system_message
end

Instance Method Details

#messageObject

Returns the error message based on the file name and the wrapped error.



115
116
117
118
# File 'lib/asimov/error.rb', line 115

def message
  "The file #{@file_name} could not be opened for upload because of the " \
    "following error - #{@system_message}."
end