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

- (DatabaseError) initialize(action, file, err)

Returns a new instance of DatabaseError



87
88
89
# File 'lib/lingo/error.rb', line 87

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

Instance Attribute Details

- (Object) action (readonly)

Returns the value of attribute action



85
86
87
# File 'lib/lingo/error.rb', line 85

def action
  @action
end

- (Object) err (readonly)

Returns the value of attribute err



85
86
87
# File 'lib/lingo/error.rb', line 85

def err
  @err
end

- (Object) file (readonly)

Returns the value of attribute file



85
86
87
# File 'lib/lingo/error.rb', line 85

def file
  @file
end

Instance Method Details

- (Object) to_s



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

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