Class: Blufin::SqlError

Inherits:
Object
  • Object
show all
Defined in:
lib/core/error_handling/sql_error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, file, line, multi_line_content) ⇒ SqlError

Returns a new instance of SqlError.

Raises:

  • (RuntimeError)


7
8
9
10
11
12
13
14
15
16
17
# File 'lib/core/error_handling/sql_error.rb', line 7

def initialize(type, file, line, multi_line_content)

    raise RuntimeError, "multi_line_content must be either nil or Array, you passed: #{multi_line_content.class}" unless multi_line_content.nil? || multi_line_content.is_a?(Array)

    @type = type
    @file = file
    @line = line

    @multi_line_content = multi_line_content

end

Instance Attribute Details

#fileObject

Returns the value of attribute file.



5
6
7
# File 'lib/core/error_handling/sql_error.rb', line 5

def file
  @file
end

#lineObject

Returns the value of attribute line.



5
6
7
# File 'lib/core/error_handling/sql_error.rb', line 5

def line
  @line
end

#multi_line_contentObject

Returns the value of attribute multi_line_content.



5
6
7
# File 'lib/core/error_handling/sql_error.rb', line 5

def multi_line_content
  @multi_line_content
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/core/error_handling/sql_error.rb', line 5

def type
  @type
end