title: Do Java exceptions deserve their own file?
body: <p>Whenever I define a new exception, I tend to do one of two things:</p>
  
  <ol>
  <li>Create an exceptions file which contains a listing of all the new exceptions defined in my project.</li>
  <li>Put each defined exception in the same file as the class in which it is thrown.</li>
  </ol>
  
  <p>Netbeans doesn't doesn't like it when I have a public exception defined in the same file as another class such as in point 2. While I haven't tried it yet, I believe it would yell at me for similar reasons for having more than one exception in the same file as in point 1.</p>
  
  <p>Should each exception really have its own file, or is there some other style which Netbeans will accept? I'm fairly new to Java and Netbeans and would love to hear what the appropriate style is.</p>