Skip to content

Commit 7924a3e

Browse files
Merge pull request #1803 from edenman/1.x
Print full classname (inner class support) and fix enum output
2 parents eb5ca77 + 9050bd5 commit 7924a3e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/main/java/rx/exceptions/OnErrorThrowable.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,19 @@ public Object getValue() {
138138
* @return a string version of the object if primitive, otherwise the classname of the object
139139
*/
140140
private static String renderValue(Object value){
141-
if(value == null){
141+
if (value == null) {
142142
return "null";
143143
}
144-
if(value.getClass().isPrimitive()){
144+
if (value.getClass().isPrimitive()) {
145145
return value.toString();
146146
}
147-
if(value instanceof String){
148-
return (String)value;
147+
if (value instanceof String) {
148+
return (String) value;
149149
}
150-
return value.getClass().getSimpleName() + ".class";
150+
if (value instanceof Enum) {
151+
return ((Enum) value).name();
152+
}
153+
return value.getClass().getName() + ".class";
151154
}
152155
}
153156
}

0 commit comments

Comments
 (0)