Class NestedThrowable.Util

  • Enclosing interface:
    NestedThrowable

    public static final class NestedThrowable.Util
    extends java.lang.Object
    Utilitiy methods for the various flavors of NestedThrowable.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static org.jboss.logging.Logger pvtLog  
    • Constructor Summary

      Constructors 
      Constructor Description
      Util()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void checkNested​(NestedThrowable parent, java.lang.Throwable child)
      Check and possibly warn if the nested exception type is the same as the parent type (duplicate nesting).
      protected static boolean getBoolean​(java.lang.String name, boolean defaultValue)
      A helper to get a boolean property.
      private static org.jboss.logging.Logger getLogger()
      Something is very broken with class nesting, which can sometimes leave log uninitialized durring one of the following method calls.
      static java.lang.String getMessage​(java.lang.String msg, java.lang.Throwable nested)
      Returns a formated message for the given detail message and nested Throwable.
      static void print​(java.lang.Throwable nested, java.io.PrintStream stream)
      Prints the nested Throwable to the given stream.
      static void print​(java.lang.Throwable nested, java.io.PrintWriter writer)
      Prints the nested Throwable to the given writer.
      • Methods inherited from class java.lang.Object

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

      • pvtLog

        private static org.jboss.logging.Logger pvtLog
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • getLogger

        private static org.jboss.logging.Logger getLogger()
        Something is very broken with class nesting, which can sometimes leave log uninitialized durring one of the following method calls.

        This is a HACK to keep those methods from NPE until this problem can be resolved.

      • getBoolean

        protected static boolean getBoolean​(java.lang.String name,
                                            boolean defaultValue)
        A helper to get a boolean property.
      • checkNested

        public static void checkNested​(NestedThrowable parent,
                                       java.lang.Throwable child)
        Check and possibly warn if the nested exception type is the same as the parent type (duplicate nesting).
      • getMessage

        public static java.lang.String getMessage​(java.lang.String msg,
                                                  java.lang.Throwable nested)
        Returns a formated message for the given detail message and nested Throwable.
        Parameters:
        msg - Detail message.
        nested - Nested Throwable.
        Returns:
        Formatted message.
      • print

        public static void print​(java.lang.Throwable nested,
                                 java.io.PrintStream stream)
        Prints the nested Throwable to the given stream.
        Parameters:
        nested - Nested Throwable.
        stream - Stream to print to.
      • print

        public static void print​(java.lang.Throwable nested,
                                 java.io.PrintWriter writer)
        Prints the nested Throwable to the given writer.
        Parameters:
        nested - Nested Throwable.
        writer - Writer to print to.