Check the BApplication construction error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13314 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
62d011e8ef
commit
7e5f681ff4
@ -1,5 +1,8 @@
|
||||
// TestApp.cpp
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Autolock.h>
|
||||
|
||||
#include <TestApp.h>
|
||||
@ -27,12 +30,20 @@ BTestHandler::Queue()
|
||||
|
||||
// TestApp
|
||||
|
||||
static status_t sInitError;
|
||||
|
||||
// constructor
|
||||
BTestApp::BTestApp(const char *signature)
|
||||
: BApplication(signature),
|
||||
: BApplication(signature, &sInitError),
|
||||
fAppThread(B_ERROR),
|
||||
fHandlers()
|
||||
{
|
||||
if (sInitError != B_OK) {
|
||||
fprintf(stderr, "BTestApp::BTestApp(): Failed to create BApplication: "
|
||||
"%s\n", strerror(sInitError));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
CreateTestHandler();
|
||||
Unlock();
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
// TestApp.cpp
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Autolock.h>
|
||||
|
||||
#include <TestApp.h>
|
||||
@ -29,13 +32,21 @@ BTestHandler::Queue()
|
||||
|
||||
// TestApp
|
||||
|
||||
static status_t sInitError;
|
||||
|
||||
// constructor
|
||||
_EXPORT
|
||||
BTestApp::BTestApp(const char *signature)
|
||||
: BApplication(signature),
|
||||
: BApplication(signature, &sInitError),
|
||||
fAppThread(B_ERROR),
|
||||
fHandlers()
|
||||
{
|
||||
if (sInitError != B_OK) {
|
||||
fprintf(stderr, "BTestApp::BTestApp(): Failed to create BApplication: "
|
||||
"%s\n", strerror(sInitError));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
CreateTestHandler();
|
||||
Unlock();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user