Sha256: 66e3d60a2cb34b9b8005ccf18d33c45ec10753607744fb58fd41a12fdfdbc1d2

Contents?: true

Size: 517 Bytes

Versions: 11

Compression:

Stored size: 517 Bytes

Contents

require 'spec_helper'

describe V8::Error do
  it "uses the same ruby exception through multiple language boundaries" do
    V8::Context.new do |cxt|
      error = StandardError.new('potato')
      cxt['one'] = lambda do
        cxt.eval('two()', 'one.js')
      end
      cxt['two'] = lambda do
        cxt.eval('three()', 'two.js')
      end
      cxt['three'] = lambda do
        raise error
      end
      lambda {
        cxt.eval('three()')
      }.should raise_error {|e| e.should be error}
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
therubyracer-0.11.0beta6-x86-linux spec/v8/error_spec.rb
therubyracer-0.11.0beta6-x86_64-linux spec/v8/error_spec.rb
therubyracer-0.11.0beta6 spec/v8/error_spec.rb
therubyracer-0.11.0beta5-x86-linux spec/v8/error_spec.rb
therubyracer-0.11.0beta5 spec/v8/error_spec.rb
therubyracer-0.11.0beta5-x86_64-linux spec/v8/error_spec.rb
therubyracer-0.11.0beta4 spec/v8/error_spec.rb
therubyracer-0.11.0beta3 spec/v8/error_spec.rb
therubyracer-0.11.0beta2-x86_64-linux spec/v8/error_spec.rb
therubyracer-0.11.0beta2 spec/v8/error_spec.rb
therubyracer-0.11.0beta1 spec/v8/error_spec.rb