diff options
-rw-r--r-- | odk/examples/cpp/counter/countermain.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/odk/examples/cpp/counter/countermain.cxx b/odk/examples/cpp/counter/countermain.cxx index 008af0dd6c74..87a4de7e4fdb 100644 --- a/odk/examples/cpp/counter/countermain.cxx +++ b/odk/examples/cpp/counter/countermain.cxx @@ -41,6 +41,9 @@ ************************************************************************* *************************************************************************/ +#include "sal/config.h" + +#include <cstdlib> #include <stdio.h> #include <sal/main.h> @@ -94,11 +97,12 @@ SAL_IMPLEMENT_MAIN() } Reference< XComponent >::query( xContext )->dispose(); + return EXIT_SUCCESS; } catch( Exception& e) { printf("Error: caught exception:\n %s\n", OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US).getStr()); - exit(1); + return EXIT_FAILURE; } } |