better error handling
This commit is contained in:
parent
6fa36c3432
commit
570fbf8387
|
@ -73,6 +73,12 @@ public class EAXTest extends BasicTest {
|
||||||
* Runs the actual test, using supplied arguments
|
* Runs the actual test, using supplied arguments
|
||||||
*/
|
*/
|
||||||
protected void execute(String[] args) {
|
protected void execute(String[] args) {
|
||||||
|
|
||||||
|
if(!AL.isCreated()) {
|
||||||
|
System.out.println("Unable to continue with EAXTest, since OpenAL could not be initialized.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
System.out.print("Testing EAX support...");
|
System.out.print("Testing EAX support...");
|
||||||
EAX.create();
|
EAX.create();
|
||||||
|
@ -81,13 +87,6 @@ public class EAXTest extends BasicTest {
|
||||||
System.out.println("not supported!");
|
System.out.println("not supported!");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
AL.create();
|
|
||||||
AL.alGetError(); // clear any errors
|
|
||||||
} catch(Exception e) {
|
|
||||||
System.out.println("Unable to initialize OpenAL");
|
|
||||||
}
|
|
||||||
|
|
||||||
// continue with test if EAX is supported
|
// continue with test if EAX is supported
|
||||||
if (EAX.isCreated() && AL.isCreated() && initialize()) {
|
if (EAX.isCreated() && AL.isCreated() && initialize()) {
|
||||||
runTest();
|
runTest();
|
||||||
|
@ -102,8 +101,6 @@ public class EAXTest extends BasicTest {
|
||||||
|
|
||||||
//shutdown
|
//shutdown
|
||||||
alExit();
|
alExit();
|
||||||
|
|
||||||
System.out.println("test done.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean initialize() {
|
private boolean initialize() {
|
||||||
|
|
Loading…
Reference in New Issue