Sha256: d2e7f599915be035d8721d817b335e8efc1e0b628d74604709af5d01921ebe39

Contents?: true

Size: 679 Bytes

Versions: 8

Compression:

Stored size: 679 Bytes

Contents

module RubyApp

  module Elements

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

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

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

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

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

      end

    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
RubyApp-0.2.7 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.2.6 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.2.5 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.2.4 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.2.3 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.2.2 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.2.1 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.2.0 lib/ruby_app/elements/dialogs/exception_dialog.rb