/** * Adds information helpful to a developer in diagnosing and correcting the problem. For the * information to be meaningful, the value passed should have a reasonable toString() * implementation. Different values can be added with the same label multiple times. * * <p>Note: This exception is only serializable if the object added is serializable. * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ public ContextedException addContextValue(String label, Object value) { exceptionContext.addContextValue(label, value); return this; }
/** * Adds information helpful to a developer in diagnosing and correcting the problem. For the * information to be meaningful, the value passed should have a reasonable toString() * implementation. Different values can be added with the same label multiple times. * * <p>Note: This exception is only serializable if the object added is serializable. * * @param label a textual label associated with information, {@code null} not recommended * @param value information needed to understand exception, may be {@code null} * @return {@code this}, for method chaining, not {@code null} */ @Override public ContextedRuntimeException addContextValue(final String label, final Object value) { exceptionContext.addContextValue(label, value); return this; }