Github user geomacy commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/746#discussion_r127974586
--- Diff:
utils/common/src/main/java/org/apache/brooklyn/util/exceptions/Exceptions.java
---
@@ -131,17 +130,30 @@ public static RuntimeException propagate(Throwable
throwable) {
}
/**
+ * Convenience for {@link #propagateAnnotateIfWrapping(String,
Throwable)}.
+ *
+ * @deprecated since 0.12.0 behaviour will change (default should be
to always wrap and annotate);
+ * for now users should review and switch to either
+ * {@link #propagateAnnotated(String, Throwable)} or {@link
#propagateAnnotateIfWrapping(String, Throwable)} as appropriate.
+ */
+ @Deprecated
+ public static RuntimeException propagate(String msg, Throwable
throwable) {
+ return propagate(msg, throwable, false);
+ }
+
+ /**
* See {@link #propagate(Throwable)}.
* <p>
* The given message is included <b>only</b> if the given {@link
Throwable}
* needs to be wrapped; otherwise the message is not used.
* To always include the message, use {@link
#propagateAnnotated(String, Throwable)}.
*/
- public static RuntimeException propagate(String msg, Throwable
throwable) {
+ public static RuntimeException propagateAnnotateIfWrapping(String msg,
Throwable throwable) {
return propagate(msg, throwable, false);
}
- /** As {@link #propagate(String, Throwable)} but always re-wraps
including the given message. */
+ /** As {@link #propagate(String)} but always re-wraps including the
given message.
--- End diff --
should be `propagate(Throwable)`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---