title: Access Java Exception Objects's detailed message
body: <p>I am debugging my application, I have added <code>exception.getMessage()</code> in logger, but <code>exception.getMessage()</code> prints <code>Null</code>, but , when I debug I could see my Exception String in exception object's detailed message, how can I get the exception message that is coming as detailed message? Note - <code>getMessage</code> returns <code>Null</code>.</p>
  
  <p><strong>P.S - I am not using PrintStackTrace or stacktraceElement, my logger should return the string from exception.getmessage(), that is the requirement.</strong> </p>
  
  <hr>
  
  <p>From comment:</p>
  
  <pre><code>DBException dbExe = new DBException(sqlExe); 
  DBException objDbEx = (DBException) ExceptionUtil.populateSuperException(dbExe, strTraceMesg, ConstantsIF.SEVERE_LEVEL, false, null, null, null); 
  throw objDbEx;
  </code></pre>
  
  <hr>
  
  <pre><code>public static SuperException populateSuperException (SuperException exSuperException, String strTraceMsg, char chTraceLevel, ) {
    if (strTraceMsg != null) { 
      switch (chTraceLevel) { 
        case Con.IN: 
        case Con.S: 
           //log
      } 
    } 
    return exSuperException; 
  }
  </code></pre>