Exception: RunJS::RuntimeUnavailable

Inherits:
Error
  • Object
show all
Defined in:
lib/runjs/error.rb

Instance Method Summary collapse

Constructor Details

#initialize(runtime = nil) ⇒ RuntimeUnavailable

Returns a new instance of RuntimeUnavailable.



47
48
49
50
51
52
53
54
55
# File 'lib/runjs/error.rb', line 47

def initialize(runtime = nil)
  if runtime
    super('Could not find the runtime: ' + runtime.class_name)
  else
    super('Could not find a JavaScript runtime. ' +
          "The supported runtimes are:\n" +
          RUNTIMES.reject(&:deprecated?).map(&:class_name).join(', '))
  end
end