public JSONObject getErrorJSON ( int pErrorCode , Throwable pExp , JmxRequest pJmxReq ) { JSONObject jsonObject = new JSONObject ( ) ; jsonObject . put ( "status" , pErrorCode ) ; jsonObject . put ( "error" , getExceptionMessage ( pExp ) ) ; jsonObject . put ( "error_type" , pExp . getClass ( ) . getName ( ) ) ; addErrorInfo ( jsonObject , pExp , pJmxReq ) ; if ( backendManager . isDebug ( ) ) { backendManager . error ( "Error " + pErrorCode , pExp ) ; } if ( pJmxReq != null ) { jsonObject . put ( "request" , pJmxReq . toJSON ( ) ) ; } return jsonObject ; }
Get the JSON representation for a an exception