Sha256: 7e6629ff32005f27b53d61ffc9dbb1f1961bd4200e31335a191a55b10e6b8037

Contents?: true

Size: 702 Bytes

Versions: 24

Compression:

Stored size: 702 Bytes

Contents

module RubyApp

  module Elements

    module Dialogs
      require 'ruby_app/elements/dialogs/close_dialog'
      require 'ruby_app/log'
      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::Log.exception(exception)
            RubyApp::Session.show(event, RubyApp::Elements::Dialogs::ExceptionDialog.new(exception))
          end
        end

      end

    end

  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
RubyApp-0.0.46 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.45 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.44 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.43 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.42 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.41 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.30 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.29 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.28 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.27 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.26 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.25 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.24 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.23 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.22 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.21 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.20 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.19 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.18 lib/ruby_app/elements/dialogs/exception_dialog.rb
RubyApp-0.0.17 lib/ruby_app/elements/dialogs/exception_dialog.rb