Sha256: b69b4dc3e53940b1c9d978476f795420bb10c436c21a03b7bac948f2020092ac

Contents?: true

Size: 627 Bytes

Versions: 2

Compression:

Stored size: 627 Bytes

Contents

module RubyApp

  module Elements

    module Dialogs
      require 'ruby_app/elements/dialogs/close_dialog'
      require 'ruby_app/session'

      class ExceptionDialog < RubyApp::Elements::Dialogs::CloseDialog

        template_path(:all, File.dirname(__FILE__))

        def initialize(exception)
          super()
          @exception = exception
        end

        def self.show(event)
          begin
            yield
          rescue Exception => exception
            RubyApp::Session.show(event, RubyApp::Elements::Dialogs::ExceptionDialog.new(exception))
          end
        end

      end

    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
RubyApp-0.0.12 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.11 lib/ruby_app/elements/dialogs/exception_dialog.rb