Sha256: 223e3edae96349c343fea355713b357c6894ee06754a06f6eb2d42d9c862d0d6

Contents?: true

Size: 863 Bytes

Versions: 6

Compression:

Stored size: 863 Bytes

Contents

module RubyApp

  module Elements

    module Mobile

      module Dialogs
        require 'ruby_app/elements/mobile/dialogs/response_dialog'

        class ExceptionDialog < RubyApp::Elements::Mobile::Dialogs::ResponseDialog

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

          def initialize(exception)
            super()

            @exception = exception

            @close_link = RubyApp::Elements::Mobile::Dialogs::ResponseDialog::CloseLink.new

          end

          def self.show_on_exception(event, options = {})
            begin
              yield
            rescue => exception
              RubyApp::Log.exception(RubyApp::Log::ERROR, exception)
              self.show(event, RubyApp::Elements::Mobile::Dialogs::ExceptionDialog.new(exception), options)
            end
          end

        end

      end

    end

  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
RubyApp-0.5.44 lib/ruby_app/elements/mobile/dialogs/exception_dialog.rb
RubyApp-0.5.43 lib/ruby_app/elements/mobile/dialogs/exception_dialog.rb
RubyApp-0.5.42 lib/ruby_app/elements/mobile/dialogs/exception_dialog.rb
RubyApp-0.5.41 lib/ruby_app/elements/mobile/dialogs/exception_dialog.rb
RubyApp-0.5.40 lib/ruby_app/elements/mobile/dialogs/exception_dialog.rb
RubyApp-0.5.39 lib/ruby_app/elements/mobile/dialogs/exception_dialog.rb