CMS 3D CMS Logo

VisExceptionService Class Reference

#include <VisFramework/VisFrameworkBase/interface/VisExceptionService.h>

Inheritance diagram for VisExceptionService:

IgStateElement

List of all members.

Public Member Functions

void cmsExceptionCallback (cms::Exception *e)
void errorCallback (lat::Error *e)
void exceptionCallback (std::exception *e)
void unhandledExceptionCallback (void)
 VisExceptionService (IgState *state)
 ~VisExceptionService (void)

Private Member Functions

 IG_DECLARE_STATE_ELEMENT (VisExceptionService)
virtual void msgChanged (void)

Private Attributes

QWidget * m_mainWindow
VisExceptionMessage m_msg
IgStatem_state


Detailed Description

Definition at line 22 of file VisExceptionService.h.


Constructor & Destructor Documentation

VisExceptionService::VisExceptionService ( IgState state  ) 

Definition at line 23 of file VisExceptionService.cc.

References ASSERT, m_state, and IgState::put().

00024     : m_state (state),
00025       m_mainWindow (IgQtAppWindowService::get (state)->mainWindow ()),
00026       m_msg (state, lat::CreateCallback (this, &VisExceptionService::msgChanged))
00027 {
00028     // Register ourselves into the state.
00029     ASSERT (m_state);
00030     m_state->put (s_key, this);
00031 }

VisExceptionService::~VisExceptionService ( void   ) 

Definition at line 33 of file VisExceptionService.cc.

References ASSERT, IgState::detach(), and m_state.

00034 {
00035     ASSERT (m_state);
00036     m_state->detach (s_key);
00037 }


Member Function Documentation

void VisExceptionService::cmsExceptionCallback ( cms::Exception e  ) 

Definition at line 68 of file VisExceptionService.cc.

References arg, IgArgsElement::argv(), hlt_scaler_cfg::critical, cms::Exception::explainSelf(), DBSPlugin::get(), m_mainWindow, m_msg, m_state, and VisActiveConfigurable< T >::value().

Referenced by VisHcalRecoContent::init(), VisTkSimContent::init(), VisTkRecoContent::init(), VisMuonContent::init(), VisEcalRecoContent::init(), VisPFContent::init(), VisSimHitsContent::init(), VisEventMenu::processEvent(), and VisEventMenu::rewind().

00069 {    
00070     IgArgsElement *args = IgArgsElement::get (m_state);
00071     
00072     IgQtLock ();
00073     QApplication::restoreOverrideCursor ();
00074     
00075     if (m_msg.value () == "GUI")
00076         QMessageBox::critical (m_mainWindow, "cms::Exception", QString ("<p>CMS exception caught in %1:</p>"
00077                                                                         "<p>%2</p>").arg (args->argv () [0]).arg (e->explainSelf ()));
00078 }

void VisExceptionService::errorCallback ( lat::Error e  ) 

Definition at line 55 of file VisExceptionService.cc.

References arg, IgArgsElement::argv(), hlt_scaler_cfg::critical, lat::Error::explainSelf(), DBSPlugin::get(), m_mainWindow, m_msg, m_state, and VisActiveConfigurable< T >::value().

Referenced by VisHcalRecoContent::init(), VisTkSimContent::init(), VisTkRecoContent::init(), VisMuonContent::init(), VisEcalRecoContent::init(), VisPFContent::init(), VisSimHitsContent::init(), VisEventMenu::processEvent(), and VisEventMenu::rewind().

00056 {
00057     IgArgsElement *args = IgArgsElement::get (m_state);
00058     
00059     IgQtLock ();
00060     QApplication::restoreOverrideCursor ();
00061     
00062     if (m_msg.value () == "GUI")
00063         QMessageBox::critical (m_mainWindow, "lat::Error", QString ("<p>Error caught in %1:</p>"
00064                                                                     "<p>%2</p>").arg (args->argv () [0]).arg (e->explainSelf ()));
00065 }

void VisExceptionService::exceptionCallback ( std::exception e  ) 

Definition at line 44 of file VisExceptionService.cc.

References arg, IgArgsElement::argv(), hlt_scaler_cfg::critical, DBSPlugin::get(), m_mainWindow, m_msg, m_state, and VisActiveConfigurable< T >::value().

Referenced by VisHcalRecoContent::init(), VisTkSimContent::init(), VisTkRecoContent::init(), VisMuonContent::init(), VisEcalRecoContent::init(), VisPFContent::init(), VisSimHitsContent::init(), VisEventMenu::processEvent(), and VisEventMenu::rewind().

00045 {
00046     IgArgsElement *args = IgArgsElement::get (m_state);
00047     
00048     IgQtLock ();
00049     if (m_msg.value () == "GUI")
00050         QMessageBox::critical (m_mainWindow, "Standard Library Exception", QString ("<p>Standard library exception caught in %1:</p>"
00051                                                                                     "<p>%2</p>").arg (args->argv () [0]).arg (e->what ()));
00052 }

VisExceptionService::IG_DECLARE_STATE_ELEMENT ( VisExceptionService   )  [private]

void VisExceptionService::msgChanged ( void   )  [private, virtual]

Definition at line 40 of file VisExceptionService.cc.

00041 {}

void VisExceptionService::unhandledExceptionCallback ( void   ) 

Definition at line 81 of file VisExceptionService.cc.

References IgArgsElement::argv(), hlt_scaler_cfg::critical, DBSPlugin::get(), m_mainWindow, m_msg, m_state, and VisActiveConfigurable< T >::value().

Referenced by VisHcalRecoContent::init(), VisTkSimContent::init(), VisEcalRecoContent::init(), VisMuonContent::init(), VisTkRecoContent::init(), VisPFContent::init(), VisSimHitsContent::init(), VisEventMenu::processEvent(), and VisEventMenu::rewind().

00082 {
00083     IgArgsElement *args = IgArgsElement::get (m_state);
00084     
00085     IgQtLock ();
00086     QApplication::restoreOverrideCursor ();
00087     
00088     if (m_msg.value () == "GUI")
00089         QMessageBox::critical (m_mainWindow, "Unknown Exception", QString ("<p>Unknown exception caught in %1</p>")
00090                                .arg (args->argv () [0]));
00091 }


Member Data Documentation

QWidget* VisExceptionService::m_mainWindow [private]

Definition at line 41 of file VisExceptionService.h.

Referenced by cmsExceptionCallback(), errorCallback(), exceptionCallback(), and unhandledExceptionCallback().

VisExceptionMessage VisExceptionService::m_msg [private]

Definition at line 42 of file VisExceptionService.h.

Referenced by cmsExceptionCallback(), errorCallback(), exceptionCallback(), and unhandledExceptionCallback().

IgState* VisExceptionService::m_state [private]

Definition at line 40 of file VisExceptionService.h.

Referenced by cmsExceptionCallback(), errorCallback(), exceptionCallback(), unhandledExceptionCallback(), VisExceptionService(), and ~VisExceptionService().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:23 2009 for CMSSW by  doxygen 1.5.4