@ SuppressWarnings ( "unchecked" ) public Map toMap ( ) { HashMap map = new HashMap ( ) ; map . put ( "code" , code ) ; map . put ( "message" , message ) ; if ( data != null ) map . put ( "data" , data ) ; return map ; }
Used to marshal this exception to a Map suiteable for serialization to JSON