Exception: Ohnoes::FrontendException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ohnoes/frontend_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(klass, message, backtrace) ⇒ FrontendException

Returns a new instance of FrontendException.



4
5
6
7
8
# File 'lib/ohnoes/frontend_exception.rb', line 4

def initialize(klass, message, backtrace)
  @js_class = klass
  @js_message = message
  @js_backtrace = backtrace
end

Instance Attribute Details

#js_classObject (readonly)

Returns the value of attribute js_class.



3
4
5
# File 'lib/ohnoes/frontend_exception.rb', line 3

def js_class
  @js_class
end

Instance Method Details

#backtraceObject



14
15
16
17
18
# File 'lib/ohnoes/frontend_exception.rb', line 14

def backtrace
  @js_backtrace.map do |line|
    line['file'] + ':' + line['number'] + ': in `' + line['method'] + "'"
  end
end

#messageObject



10
11
12
# File 'lib/ohnoes/frontend_exception.rb', line 10

def message
  @js_message
end