@Test public void safeGetString() { assertEquals( ReplicantUtil.safeGetString( () -> "My String" ), "My String" ); }
@Nonnull static String safeGetString( @Nonnull final Supplier<String> message ) { try { return message.get(); } catch ( final Throwable t ) { return "Exception generated whilst attempting to get supplied message.\n" + throwableToString( t ); } }
ReplicantUtil { @Nonnull static String safeGetString( @Nonnull final Supplier<String> message ) { try { return message.get(); } catch ( final Throwable t ) { return "Exception generated whilst attempting to get supplied message.\n" + throwableToString( t ); } } }
ReplicantUtil { @Nonnull static String safeGetString( @Nonnull final Supplier<String> message ) { try { return message.get(); } catch ( final Throwable t ) { return "Exception generated whilst attempting to get supplied message.\n" + throwableToString( t ); } } private  ReplicantUtil(); }
ReplicantUtil { @Nonnull static String safeGetString( @Nonnull final Supplier<String> message ) { try { return message.get(); } catch ( final Throwable t ) { return "Exception generated whilst attempting to get supplied message.\n" + throwableToString( t ); } } private  ReplicantUtil();  }
ReplicantUtil { @Nonnull static String safeGetString( @Nonnull final Supplier<String> message ) { try { return message.get(); } catch ( final Throwable t ) { return "Exception generated whilst attempting to get supplied message.\n" + throwableToString( t ); } } private  ReplicantUtil();   }