Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / [ruby] update/draw eat exceptions
- By ? Date 2009-12-12 22:19
Using Ruby 1.9 with the precompiled Windows gem. Here's a minimal example that shows my problem:

require 'rubygems'
require 'gosu'

class GameWindow < Gosu::Window
  def initialize
    super(640, 480, false)
  end

  def update
    raise 'this exception gets eaten'
  end

  def draw
    raise 'and so does this one'
  end
end

window = GameWindow.new
window.show

Basically, any exception raised inside the update or draw methods is silently "eaten", and the method ends at that point. "exit" and "abort" don't work either. I can't imagine this is by design, since it makes debugging harder (you can work around it, but that's assuming you manage to figure out the problem in the first place). Anybody else run into this? Could it be fixed in a future version?
Up Topic Gosu / Gosu Exchange / [ruby] update/draw eat exceptions

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill