private static Object[] convertThrowableMessages(final Object[] args){
  if (args != null) {
    for (int i=0; i < args.length; i++) {
      if (args[i] instanceof Throwable) {
        Throwable t=(Throwable)args[i];
        if (t.getMessage() != null) {
          args[i]=t.getMessage();
        }
      }
    }
  }
  return args;
}

private static Object [ ] convertThrowableMessages ( final Object [ ] args ) { if ( args != null ) { for ( int i = 0 ; i < args . length ; i ++ ) { if ( args [ i ] instanceof Throwable ) { Throwable t = ( Throwable ) args [ i ] ; if ( t . getMessage ( ) != null ) { args [ i ] = t . getMessage ( ) ; } } } } return args ; }
converts all throwable arguments to its message if the message is not null
