restexception.java

来自「SOApprocah方法的源程序下载 基于经典的PMI-IR方法」· Java 代码 · 共 34 行

JAVA
34
字号
package com.yahoo.rest;/** * Class encapsulating a wide range of REST-related errors. * * @author Ryan Kennedy */public class RestException extends Exception {    private byte[] errorMessage;    private RestException() {    }    /**     * Constructs a rest exception with a message and the error content     * returned by the server.     *     * @param message The message to wrap inside the exception.     * @param errorMessage The error content sent back by the server.     */    public RestException(String message, byte[] errorMessage) {        super(message);        this.errorMessage = errorMessage;    }    /**     * Gets the error content sent back by the server.     *     * @return The error content sent back by the server.     */    public byte[] getErrorMessage() {        return errorMessage;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?