title: Get the message of a java throwable in a string
body: <p>I am trying to create an error handler that will take an error message and print it to the logging file. Is there a way I can get the massage if I use a try/catch like this?</p>
  
  <pre><code>try{
      //code;
  }catch(Exception e){
     Main.error=e.?;
  }
  </code></pre>
  
  <p>I have tried e.getMessage() but it only returns null. Thanks in advance</p>