Exception: Collab::JS::JSRuntimeError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/collab/js.rb

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ JSRuntimeError

Returns a new instance of JSRuntimeError.



76
77
78
79
80
# File 'lib/collab/js.rb', line 76

def initialize(data)
  @js_backtrace = data["stack"].split("\n").map{|f| "JavaScript #{f.strip}"} if data["stack"]

  super(data["name"] + ": " + data["message"])
end

Instance Method Details

#backtraceObject



82
83
84
85
86
87
88
89
90
# File 'lib/collab/js.rb', line 82

def backtrace
  return unless  val = super
  
  if @js_backtrace
    @js_backtrace + val
  else
    val
  end
end