package com.yunfeiyun.agmp.common.exception;

/**
 * 业务异常
 * 
 * @author 杨晓辉
 */
public final class SsoException extends RuntimeException
{
    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private String code;

    /**
     * 错误提示
     */
    private String message;

    /**
     * 错误明细，内部调试错误
     *
     */
    private String detailMessage;

    /**
     * 空构造方法，避免反序列化问题
     */
    public SsoException()
    {
    }

    public SsoException(String message)
    {
        this.message = message;
    }

    public SsoException( String code,String message)
    {
        this.code = code;
        this.message = message;
    }

    public String getDetailMessage()
    {
        return detailMessage;
    }

    @Override
    public String getMessage()
    {
        return message;
    }

    public String getCode()
    {
        return code;
    }

    public SsoException setMessage(String message)
    {
        this.message = message;
        return this;
    }

    public SsoException setDetailMessage(String detailMessage)
    {
        this.detailMessage = detailMessage;
        return this;
    }
}