public String getFaultMessage ( ) { String fmsg = null ; Object fault = getFault ( ) ; if ( fault != null ) { if ( fault instanceof Throwable ) { fmsg = String . format ( CommonKnowledgeMessages . MESSAGES . faultEncountered ( ) + " [%s(message=%s)]: %s" , fault . getClass ( ) . getName ( ) , ( ( Throwable ) fault ) . getMessage ( ) , fault ) ; } else { fmsg = String . format ( CommonKnowledgeMessages . MESSAGES . faultEncountered ( ) + " [%s]: %s" , fault . getClass ( ) . getName ( ) , fault ) ; } } return fmsg ; }
Gets a fault message if a fault exists .