Operating System - HP-UX
1827892 Members
1707 Online
109969 Solutions
New Discussion

Re: libdcekt throws exception I cannot catch

 
Dan O'Connell_1
New Member

libdcekt throws exception I cannot catch

We have a C++ multi-threaded application that uses pthreads, along with the DCE library (kernel threaded version) for user validation.

Quite often the application exits with an abort signal after some function in libdcekt prints

"Unhandled exception; exiting!
^@Exception kind is status,value is 10. Thread N"

where ^@ is a null character and N is the thread number. libdcekt.a and its dynamic cousins are the only libraries the app is linked with that contain that "Unhandled" string.

Any idea how how I can catch this DCE exception?

I have tried using the TRY/CATCH_ALL/ENDTRY macros around the DCE functions that we're using (sec_login_setup_identity, sec_login_validate_identity), but the macros have no effect when libdcekt aborts. That is, the CATCH_ALL macro does not catch anyting. We're not using C++ exceptions in this app, and we're compiling with -AP, not -AA (not using the new stdlib).

After scouring the HP DCE docs, I've tried quite a few different combinations of #defines that are available in the DCE headers, but nothing makes a difference.

Just wondering if anyone has successfully caught a DCE exception from libdcekt, in a C++ app, and how did you do it. (Note that the application does not run if I link it with the CMA DCE library, libdce.a).

Host: HP 9000/800 HPUX 11i (B.11.11)
Compiler: HP aCC A.03.50

Thanks for any help,
Dan O'Connell
2 REPLIES 2
Stephen Keane
Honored Contributor

Re: libdcekt throws exception I cannot catch

Dan O'Connell_1
New Member

Re: libdcekt throws exception I cannot catch

Yes, I've studied that document many times. It does state that HP DCE is only supported with ANSI C. However, there is also a section that discusses using DCE with C++, so I'm assuming that's ok.

I have read in other HP DCE docs that you can use the "standard" function return values, or you can use the exception-handling interface, which the doc stated was a non-standard extension. But there is no combination of CPP flags that I've been able to devise to *not* use the exception-handling interface.

The DCE 1.8 release notes seems to be focused on the deprecated CMA version, not the kernel threads version. Indeed, all of the sample code in the release is also for the CMA interface; none of it is for the kernel-threads versions.