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.



81
82
83
84
85
# File 'lib/collab/js.rb', line 81

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



87
88
89
90
91
92
93
94
95
# File 'lib/collab/js.rb', line 87

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