Class: RubyApp::Elements::Dialogs::ExceptionDialog

Inherits:
CloseDialog show all
Defined in:
lib/ruby_app/elements/dialogs/exception_dialog.rb

Instance Attribute Summary

Attributes inherited from Base::BaseDialog

#response

Attributes inherited from RubyApp::Element

#attributes

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from RubyApp::Element

#element_id, get_element

Methods included from Mixins::ConfigureMixin

#configure

Methods included from Mixins::TranslateMixin

#localize, #translate

Methods included from Mixins::TemplateMixin

#exclude_parent_template, #exclude_parent_template?, #get_templates, #template_name, #template_path

Methods included from Mixins::RenderMixin

#clear_content_for, #content_for, #render, #rendered?

Constructor Details

#initialize(exception) ⇒ ExceptionDialog

Returns a new instance of ExceptionDialog.



14
15
16
17
# File 'lib/ruby_app/elements/dialogs/exception_dialog.rb', line 14

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

Class Method Details

.show(event) ⇒ Object



19
20
21
22
23
24
25
26
# File 'lib/ruby_app/elements/dialogs/exception_dialog.rb', line 19

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