Exception: Lingo::DatabaseError

Inherits:
LingoError
  • Object
show all
Defined in:
lib/lingo/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from LingoError

#class_name, #error

Constructor Details

#initialize(action, file, err) ⇒ DatabaseError

Returns a new instance of DatabaseError.



94
95
96
# File 'lib/lingo/error.rb', line 94

def initialize(action, file, err)
  @action, @file, @err = action, file, err
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



92
93
94
# File 'lib/lingo/error.rb', line 92

def action
  @action
end

#errObject (readonly)

Returns the value of attribute err.



92
93
94
# File 'lib/lingo/error.rb', line 92

def err
  @err
end

#fileObject (readonly)

Returns the value of attribute file.



92
93
94
# File 'lib/lingo/error.rb', line 92

def file
  @file
end

Instance Method Details

#to_sObject



98
99
100
# File 'lib/lingo/error.rb', line 98

def to_s
  error("An error occured while trying to #{action} `#{file}'")
end