1616package rx .exceptions ;
1717
1818/**
19- * @warn javadoc class description missing
19+ * Represents a {@code Throwable} that an {@code Observable} might notify its subscribers of, but that then can
20+ * be handled by an operator that is designed to recover from or react appropriately to such an error. You can
21+ * recover more information from an {@code OnErrorThrowable} than is found in a typical {@code Throwable}, such
22+ * as the item the {@code Observable} was trying to emit at the time the error was encountered.
2023 */
2124public class OnErrorThrowable extends RuntimeException {
2225
@@ -38,8 +41,9 @@ private OnErrorThrowable(Throwable exception, Object value) {
3841 }
3942
4043 /**
41- * @warn javadoc missing
42- * @return
44+ * Get the value associated with this {@code OnErrorThrowable}
45+ *
46+ * @return the value associated with this {@code OnErrorThrowable} (or {@code null} if there is none)
4347 */
4448 public Object getValue () {
4549 return value ;
@@ -72,13 +76,13 @@ public static OnErrorThrowable from(Throwable t) {
7276 }
7377
7478 /**
75- * Adds the given value as the final cause of the given {@code Throwable} wrapped in
76- * {@code OnNextValue}/ {@code RuntimeException}.
79+ * Adds the given item as the final cause of the given {@code Throwable}, wrapped in {@code OnNextValue}
80+ * (which extends {@code RuntimeException}) .
7781 *
7882 * @param e
7983 * the {@link Throwable} to which you want to add a cause
8084 * @param value
81- * the cause you want to add to {@code e}
85+ * the item you want to add to {@code e} as the cause of the {@code Throwable }
8286 * @return the same {@code Throwable} ({@code e}) that was passed in, with {@code value} added to it as a
8387 * cause
8488 */
@@ -96,24 +100,30 @@ public static Throwable addValueAsLastCause(Throwable e, Object value) {
96100 }
97101
98102 /**
99- * @warn javadoc class description missing
103+ * Represents an exception that was encountered while trying to emit an item from an Observable, and
104+ * tries to preserve that item for future use and/or reporting.
100105 */
101106 public static class OnNextValue extends RuntimeException {
102107
103108 private static final long serialVersionUID = -3454462756050397899L ;
104109 private final Object value ;
105110
106111 /**
107- * @warn javadoc missing
112+ * Create an {@code OnNextValue} exception and include in its error message a string representation of
113+ * the item that was intended to be emitted at the time the exception was handled.
114+ *
115+ * @param value
116+ * the item that the Observable was trying to emit at the time of the exception
108117 */
109118 public OnNextValue (Object value ) {
110119 super ("OnError while emitting onNext value: " + value );
111120 this .value = value ;
112121 }
113122
114123 /**
115- * @warn javadoc missing
116- * @return
124+ * Retrieve the item that the Observable was trying to emit at the time this exception occurred.
125+ *
126+ * @return the item that the Observable was trying to emit at the time of the exception
117127 */
118128 public Object getValue () {
119129 return value ;
0 commit comments