I have this try-block

try {
      FileReader textFileReader = new FileReader(filename);
      BufferedReader textReader = new BufferedReader(textFileReader);
      String post = textReader.readLine();
      int weeknumber = Integer.valueOf(post);
      if (weeknumber != weeknmbr) {
       System.out.println("Wrong weeknumber.");
       return false;
      post = textReader.readLine();
      while (post != null) {
        post = textReader.readLine();

but I'm unsure which exceptions I should catch for it. I'm thinking IOException, but do I need one for weeknumber, and if so which? ArithmeticException maybe, or NumberFormatException or something?

Nevermind, I guess I don't need that since I have the if-sentence.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.