From 570fbf838707e91ab21ccd35a9d68e92cf07f7e8 Mon Sep 17 00:00:00 2001 From: Brian Matzon Date: Thu, 8 Jan 2004 22:45:10 +0000 Subject: [PATCH] better error handling --- src/java/org/lwjgl/test/openal/EAXTest.java | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/java/org/lwjgl/test/openal/EAXTest.java b/src/java/org/lwjgl/test/openal/EAXTest.java index 37de9507..cfa2684a 100644 --- a/src/java/org/lwjgl/test/openal/EAXTest.java +++ b/src/java/org/lwjgl/test/openal/EAXTest.java @@ -73,6 +73,12 @@ public class EAXTest extends BasicTest { * Runs the actual test, using supplied arguments */ protected void execute(String[] args) { + + if(!AL.isCreated()) { + System.out.println("Unable to continue with EAXTest, since OpenAL could not be initialized."); + return; + } + try { System.out.print("Testing EAX support..."); EAX.create(); @@ -81,13 +87,6 @@ public class EAXTest extends BasicTest { 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 if (EAX.isCreated() && AL.isCreated() && initialize()) { runTest(); @@ -102,8 +101,6 @@ public class EAXTest extends BasicTest { //shutdown alExit(); - - System.out.println("test done."); } private boolean initialize() {