public void addErrorsProperties ( Map < String , Object > properties , Object errorsType ) { try { Method method = errorsType . getClass ( ) . getMethod ( "getErrors" , EMPTY_PARAMS ) ; if ( method != null ) { Object value = method . invoke ( errorsType , EMPTY_DATA ) ; if ( value instanceof List < ? > ) { for ( Object errorType : ( List < ? > ) value ) { method = errorType . getClass ( ) . getMethod ( "getShortText" , EMPTY_PARAMS ) ; if ( method != null ) { value = method . invoke ( errorType , EMPTY_DATA ) ; if ( value instanceof String ) properties . put ( "Error" , value ) ; } } } } } catch ( SecurityException e ) { e . printStackTrace ( ) ; } catch ( IllegalArgumentException e ) { e . printStackTrace ( ) ; } catch ( NoSuchMethodException e ) { e . printStackTrace ( ) ; } catch ( IllegalAccessException e ) { e . printStackTrace ( ) ; } catch ( InvocationTargetException e ) { e . printStackTrace ( ) ; } }
Add the error properties from this message .