Package org.greenrobot.eventbus.util
Class ExceptionToResourceMapping
- java.lang.Object
-
- org.greenrobot.eventbus.util.ExceptionToResourceMapping
-
public class ExceptionToResourceMapping extends java.lang.Object
Maps throwables to texts for error dialogs. Use Config to configure the mapping.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Map<java.lang.Class<? extends java.lang.Throwable>,java.lang.Integer>
throwableToMsgIdMap
-
Constructor Summary
Constructors Constructor Description ExceptionToResourceMapping()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExceptionToResourceMapping
addMapping(java.lang.Class<? extends java.lang.Throwable> clazz, int msgId)
java.lang.Integer
mapThrowable(java.lang.Throwable throwable)
Looks at the exception and its causes trying to find an ID.protected java.lang.Integer
mapThrowableFlat(java.lang.Throwable throwable)
Mapping without checking the cause (done in mapThrowable).
-
-
-
Method Detail
-
mapThrowable
public java.lang.Integer mapThrowable(java.lang.Throwable throwable)
Looks at the exception and its causes trying to find an ID.
-
mapThrowableFlat
protected java.lang.Integer mapThrowableFlat(java.lang.Throwable throwable)
Mapping without checking the cause (done in mapThrowable).
-
addMapping
public ExceptionToResourceMapping addMapping(java.lang.Class<? extends java.lang.Throwable> clazz, int msgId)
-
-