title: Java Exception.getMessage() returns -1
body: <p>I am trying to debug a piece of <strong><em>production</em></strong> code. I did not write it, so please do not criticize it. I know it is terrible practice for multiple reasons, and I would change it if I could, but I can't.</p>
  
  <p>The code looks like:</p>
  
  <pre><code>try
  {
      ...
      // Multiple lines of code that can throw exceptions
      ...
  }
  
  catch (Exception e)
  {
      System.out.println("Exception: " + e.getMessage());
  }
  </code></pre>
  
  <p><strong><em>Nowhere in those multiple lines of code is an exception thrown manually.</em></strong> </p>
  
  <p>Despite this, the following is the entirety of what is printed in the case I'm trying to debug:</p>
  
  <pre><code>Exception: -1
  </code></pre>
  
  <p>The Java documentation for Throwable.getMessage() says</p>
  
  <pre><code>getMessage
  
  public String getMessage()
      Returns the detail message string of this throwable.
  
      Returns:
          the detail message string of this Throwable instance (which may be null).
  </code></pre>
  
  <p>All non-native library methods that can throw exceptions are correctly caught around where they are called within the larger try-catch block. So, speaking specifically in regards to Exceptions in the standard JDK, are there any possible Exceptions whose messages are simply "-1"?</p>