Class 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  
    • 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).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • throwableToMsgIdMap

        public final java.util.Map<java.lang.Class<? extends java.lang.Throwable>,​java.lang.Integer> throwableToMsgIdMap
    • Constructor Detail

      • ExceptionToResourceMapping

        public ExceptionToResourceMapping()
    • 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).