@Test public void testWrapNotSerializable() throws ClassNotFoundException { Exception wrapped = new NotSerializableTestException("testWrapNotSerializable-Message"); TransferableExceptionWrapper wrapper = TransferableExceptionWrapper.wrap(wrapped); checkWrapper(wrapped, wrapper); }
public static TransferableExceptionWrapper wrap(Throwable exception) { if (exception == null) { return null; } if (exception instanceof TransferableExceptionWrapper) { return (TransferableExceptionWrapper)exception; } else { return new TransferableExceptionWrapper(exception); } }
TransferableExceptionWrapper extends RuntimeException { public static TransferableExceptionWrapper wrap(Throwable exception) { if (exception == null) { return null; } if (exception instanceof TransferableExceptionWrapper) { return (TransferableExceptionWrapper)exception; } else { return new TransferableExceptionWrapper(exception); } } }
TransferableExceptionWrapper extends RuntimeException { public static TransferableExceptionWrapper wrap(Throwable exception) { if (exception == null) { return null; } if (exception instanceof TransferableExceptionWrapper) { return (TransferableExceptionWrapper)exception; } else { return new TransferableExceptionWrapper(exception); } } TransferableExceptionWrapper(Throwable wrapped); }
TransferableExceptionWrapper extends RuntimeException { public static TransferableExceptionWrapper wrap(Throwable exception) { if (exception == null) { return null; } if (exception instanceof TransferableExceptionWrapper) { return (TransferableExceptionWrapper)exception; } else { return new TransferableExceptionWrapper(exception); } } TransferableExceptionWrapper(Throwable wrapped); static TransferableExceptionWrapper wrap(Throwable exception); String getOriginalClassName(); String getOriginalMessage(); @Override String getMessage(); }
TransferableExceptionWrapper extends RuntimeException { public static TransferableExceptionWrapper wrap(Throwable exception) { if (exception == null) { return null; } if (exception instanceof TransferableExceptionWrapper) { return (TransferableExceptionWrapper)exception; } else { return new TransferableExceptionWrapper(exception); } } TransferableExceptionWrapper(Throwable wrapped); static TransferableExceptionWrapper wrap(Throwable exception); String getOriginalClassName(); String getOriginalMessage(); @Override String getMessage();  }