Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Java Exception Handlering
#1
Here's a little piece of my game code.

Code:
try {
    assetManager.registerLocator("map.zip", ZipLocator.class.getName());
    sceneModel = assetManager.loadModel("main.scene");
    sceneModel.setLocalScale(2f);
    }
    catch (FileNotFoundException e) {
        System.err.println("ERROR: file not found.");
        
    }


Whats causing the error is the catch, it says.

Java Compiler Wrote:exception java.io.FileNotFoundException is never thrown in body of corresponding try statement
Reply


Messages In This Thread
Java Exception Handlering - by Dignity - 11-23-2011, 02:58 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)