title: Handling exceptions in the catch block?
body: <p>This may be a dumb question, but I haven't been able to find the answer anywhere else. I have a class that will read and write to a file for saves. Now, I'm trying to handle some possible errors that could come my way. What I want to know is if this is legal or common practice in Java:</p>
  
  <pre><code>try {
      in = new ObjectInputStream(new FileInputStream(fileName));
      score = (Score)in.readObject();
  } catch() {
      ...
  }
  </code></pre>
  
  <p>The problem I'm having is if the file is empty, it cannot read the file. The program will crash, so I want to know is common or regular practice to create some data in the file from the catch statement, then try/catch it again. Then at the second catch I can crash the program. </p>
  
  <p>The reason I have for wanting to do it this way is in the case that the user erases the data in the file. </p>
  
  <p>If it's legal, would this be the syntax?</p>
  
  <pre><code>try {
      // try something here
  } catch(//Exception here) {
      // Create a new file and try again.
      try {
          // try again
      } catch() {
          // Crash the program
      }
  }
  </code></pre>