Class StateException

  • All Implemented Interfaces:
    java.io.Serializable

    public class StateException
    extends java.lang.RuntimeException
    状态码异常类
    Author:
    wudi
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      StateException()
      构造 默认StateCode.ERROR
      StateException​(int code)
      根据错误码构造异常
      StateException​(int code, java.lang.String message)
      根据错误码和错误信息构造异常
      StateException​(StateCode code)
      根据状态码信息构造异常
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      StateCode state()
      获得异常状态码
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

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

      • StateException

        public StateException()
        构造 默认StateCode.ERROR
      • StateException

        public StateException​(int code)
        根据错误码构造异常
        Parameters:
        code - 错误码
      • StateException

        public StateException​(int code,
                              java.lang.String message)
        根据错误码和错误信息构造异常
        Parameters:
        code - 错误码
        message - 错误信息
      • StateException

        public StateException​(StateCode code)
        根据状态码信息构造异常
        Parameters:
        code - 状态码信息
    • Method Detail

      • state

        public StateCode state()
        获得异常状态码
        Returns:
        状态码