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_content_type, get_element

Methods included from Mixins::ConfigurationMixin

#configuration

Methods included from Mixins::TranslateMixin

#localize, #translate

Methods included from Mixins::TemplateMixin

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

Methods included from Mixins::RenderMixin

#content_for, #render, #rendered?, #templates

Constructor Details

#initialize(exception) ⇒ ExceptionDialog

Returns a new instance of ExceptionDialog.



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

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

Class Method Details

.show_dialog(event) ⇒ Object



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

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