Summary
How to print out details of an exception in an Orbix 3.3 per-process filter.
Environment
Orbix 3.3, All Supported OS
Question/Problem Description
How to print out details of an exception in an Orbix 3.3 per-process filter.
Clarifying Information
A per-process filter can monitor ten individual points during the transmission and reception of an operation or attribute request:
- four Pre-marshalling Filter Points
- four Post-marshalling Filter Points
- two Failure Points
- out reply failure (in the target object’s address space)
- in reply failure (in the caller’s address space)
Resolution
Use the Environment parameter to access the details of the exception as shown in the code below.
void MyProcessFilter::outReplyFailure (CORBA::Request &r, CORBA::Environment &env)
{
CORBA::Exception *e = env.exception();
cout << endl << "In outReplyFailure, operation "
<< r.operation () << " Raised Exception. " << endl;
if (e) {
cout << "Exception is: " << e->_toString() << endl;
}
return;
}
void MyProcessFilter::inReplyFailure (CORBA::Request &r, CORBA::Environment &env)
{
CORBA::Exception *e = env.exception();
cout << endl << "In inReplyFailure, operation "
<< r.operation () << " Raised Exception. " << endl;
if (e) {
cout << "Exception is: " << e->_toString() << endl;
}
return;
}
Support Incidents
3115642
Notes
For further details please see chapter "Filtering Operation Calls" in the Orbix 3.3 Programmer's Guide, and section "CORBA::Environment" in the Orbix 3.3 Programmer's Reference.
#Orbix
#KnowledgeDocs