class GosuWindowWrapper < Gosu::Window
def initialize
super(640, 480, false)
end
def update_callback
#...
end
def draw_callback
#...
end
def update
begin
update_callback
rescue SystemExit
close
rescue Exception => e
puts e.message
puts e.backtrace
close
end
return nil
end
def draw
begin
draw_callback
rescue SystemExit
close
rescue Exception => e
puts e.message
puts e.backtrace
close
end
return nil
end
end
def update
update_callback
rescue SystemExit
close
rescue Exception => e
puts e.message
puts e.backtrace
close
end
def draw
draw_callback
rescue SystemExit
close
rescue Exception => e
puts e.message
puts e.backtrace
close
end
show; also doing this for all callbacks, not just the major two.SystemExit and from a quick irb'ing don't understand it. Since this is about the first pure-Ruby bug ever and I am on github, anyone who can reproduce this bug (not me) can test & merge a solution :)
Powered by mwForum 2.29.1 © 1999-2013 Markus Wichitill