Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
DRb and exceptions
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Eric Hodel, post: 4473131"] What's your code? This works: $ cat exc.rb require 'drb' PATH = 'druby://localhost:9000' class Raiser def do_raise raise RuntimeError, "Here we go!" end end case ARGV.shift when 'client' raiser = DRbObject.new nil, PATH raiser.do_raise when 'server' DRb.start_service PATH, Raiser.new trap 'INT' do exit end DRb.thread.join else STDERR.puts "#{$0} client|server" exit 1 end $ ruby exc.rb server & [1] 3710 $ ruby exc.rb client (druby://localhost:9000) exc.rb:7:in `do_raise': Here we go! (RuntimeError) from exc.rb:14 [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
DRb and exceptions
Top