Class SeedException

  • All Implemented Interfaces:
    Serializable

    public class SeedException
    extends org.seedstack.shed.exception.BaseException
    This is the base class for all SeedStack Java framework exceptions.
    See Also:
    Serialized Form
    • Constructor Detail

      • SeedException

        protected SeedException​(org.seedstack.shed.exception.ErrorCode errorCode)
      • SeedException

        protected SeedException​(org.seedstack.shed.exception.ErrorCode errorCode,
                                Throwable cause)
    • Method Detail

      • createNew

        public static SeedException createNew​(org.seedstack.shed.exception.ErrorCode errorCode)
        Create a new SeedException from an ErrorCode.
        Parameters:
        errorCode - the error code to set.
        Returns:
        the created SeedException.
      • wrap

        public static SeedException wrap​(Throwable throwable,
                                         org.seedstack.shed.exception.ErrorCode errorCode)
        Wrap a SeedException with an ErrorCode around an existing Throwable.
        Parameters:
        throwable - the existing throwable to wrap.
        errorCode - the error code to set.
        Returns:
        the created SeedException.