title: Try / Catch not displaying Exception error message
body: <p>Hey there so in my class I had written this: </p>
  
  <pre><code>public void setId(String id) { ...
      if (id.matches("[a-zA-Z]{3}-\\d{4}")) {
          this.id = id;
      } else { // id is invalid: exception occurs
          throw new IllegalArgumentException("Inventory ID must be in the "
              + "form of ABC-1234");
      }
  
  }
  </code></pre>
  
  <p>then in my main program I did this:</p>
  
  <pre><code>while (idLoopTrigger == true) {
          try {
  
              System.out.println("Please enter id: ");
              id = in.nextLine();
  
              if (id.matches("[a-zA-Z]{3}-\\d{4}")) {
                  idLoopTrigger = false;
              }
  
          } catch (Exception ex) {
  
              //print this error message out
              System.out.println(ex.getMessage());
  
          }
  
      }
  </code></pre>
  
  <p>So it will loop until the user inputs the correct info but it won't display the exception message from my class. Thoughts?</p>