diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-25 11:06:06 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-25 11:06:06 +0100 |
commit | c58908e7616c5e183ceb34c571b84f13389ecf9a (patch) | |
tree | 46b255f9c064d57e1a54bf7672a603c3e9ad82de /tests/service | |
parent | 179309442b1b6902de34941e68aa76257ae279af (diff) | |
download | wolfbones-c58908e7616c5e183ceb34c571b84f13389ecf9a.tar.gz wolfbones-c58908e7616c5e183ceb34c571b84f13389ecf9a.tar.bz2 |
fixed error handling in testservice.c
Diffstat (limited to 'tests/service')
-rw-r--r-- | tests/service/testservice.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/service/testservice.c b/tests/service/testservice.c index 55023b5..18f57af 100644 --- a/tests/service/testservice.c +++ b/tests/service/testservice.c @@ -15,6 +15,7 @@ static void wolf_service_register( void ) { SC_HANDLE scm; + char errbuf[512]; wolf_log( WOLF_LOG_INFO, WOLF_CATEGORY_TESTSERVICE, WOLF_MSG_TESTSERVICE_REGISTERING_SERVICE, "Registering service" ); @@ -28,9 +29,10 @@ static void wolf_service_register( void ) { SC_MANAGER_ALL_ACCESS ); if( scm == NULL ) { + WOLF_LOG_GET_LAST_ERROR( GetLastError( ), errbuf, 512 ); wolf_log( WOLF_LOG_EMERG, WOLF_CATEGORY_TESTSERVICE, WOLF_MSG_TESTSERVICE_CANT_OPEN_SCM, - _( "Unable to open the service control manager to register service '%s'" ), - "testservice" ); + _( "Unable to open the service control manager to register service '%s': %s (%d)" ), + "testservice", errbuf, GetLastError( ) ); } } |