Class Exceptions


  • public class Exceptions
    extends java.lang.Object
    Exceptions utilities.
    Author:
    Alexey Stashok
    • Constructor Summary

      Constructors 
      Constructor Description
      Exceptions()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getAllStackTracesAsString()  
      static java.lang.String getStackTraceAsString​(java.lang.Throwable t)
      Returns the Throwable's stack trace information as String.
      static java.io.IOException makeIOException​(java.lang.Throwable t)
      Wrap the given Throwable by IOException.
      • Methods inherited from class java.lang.Object

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

      • Exceptions

        public Exceptions()
    • Method Detail

      • getStackTraceAsString

        public static java.lang.String getStackTraceAsString​(java.lang.Throwable t)
        Returns the Throwable's stack trace information as String. The result String format will be the same as reported by Throwable.printStackTrace().
        Parameters:
        t - Throwable.
        Returns:
        the Throwable's stack trace information as String.
      • makeIOException

        public static java.io.IOException makeIOException​(java.lang.Throwable t)
        Wrap the given Throwable by IOException.
        Parameters:
        t - Throwable.
        Returns:
        IOException.
      • getAllStackTracesAsString

        public static java.lang.String getAllStackTracesAsString()
        Returns:
        String representation of all the JVM threads
        See Also:
        Thread.getAllStackTraces()