Skip to content

Instantly share code, notes, and snippets.

@pragtobgists
Last active November 13, 2017 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pragtobgists/0d24edc25f5e3892d586ea3a05e173b1 to your computer and use it in GitHub Desktop.
Save pragtobgists/0d24edc25f5e3892d586ea3a05e173b1 to your computer and use it in GitHub Desktop.
WHY comment
def paint_control(event)
# some painting code
rescue => e
# Really important to rescue here. Failures that escape this method
# cause odd-ball hangs with no stacktraces. See #559 for an example.
puts "SWALLOWED PAINT EXCEPTION ON #{@obj} - go take care of it: " + e.to_s
puts 'Unfortunately we have to swallow it because it causes odd failures :('
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment