summaryrefslogtreecommitdiff
path: root/tests/DLL_Test.cpp
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-05-15 16:35:16 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-05-15 16:35:16 +0000
commit14bbb72565893ffad79faccdac6550e41ca89fd4 (patch)
treec92a2056a2a3f9691e61b8cacf2f3a5d3717e4cb /tests/DLL_Test.cpp
parent19bec382378b1ba1e336457cbf1d80296351e08c (diff)
downloadATCD-14bbb72565893ffad79faccdac6550e41ca89fd4.tar.gz
Wed May 15 15:58:07 UTC 2002 Don Hinton <dhinton@ieee.org>
Diffstat (limited to 'tests/DLL_Test.cpp')
-rw-r--r--tests/DLL_Test.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/tests/DLL_Test.cpp b/tests/DLL_Test.cpp
index 87159629128..82b22ccfb49 100644
--- a/tests/DLL_Test.cpp
+++ b/tests/DLL_Test.cpp
@@ -50,6 +50,10 @@ ACE_TMAIN (int, ACE_TCHAR *[])
ACE_DLL dll;
+ // This is just to make sure that it's safe to call error() at any time, i.e.,
+ // it shouldn't seg-fault.
+ ACE_TCHAR *dll_error = dll.error ();
+
#if defined (__KCC)
/* With KCC, turning on close-on-destruction will cause problems
when libKCC tries to call dtors. */
@@ -65,9 +69,13 @@ ACE_TMAIN (int, ACE_TCHAR *[])
#endif /* __KCC */
if (retval != 0)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("Error in DLL Open\n")),
- -1);
+ {
+ dll_error = dll.error ();
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("Error in DLL Open: %s\n"),
+ dll_error ? dll_error : ACE_TEXT ("unknown error")),
+ -1);
+ }
// Just because the ANSI C++ spec says you can no longer cast a
// void* to a function pointer. Doesn't allow: