class ResourceException extends RuntimeException {

    public static String symbolForCode(int code) {
        switch (code) {
        case OK:
            return "OK";
        case CREATED:
            return "CREATED";
        case ACCEPTED:
            return "ACCEPTED";
        case NO_CONTENT:
            return "NO_CONTENT";
        case MOVED_PERMANENTLY:
            return "MOVED_PERMANENTLY";
        case FOUND:
            return "FOUND";
        case SEE_OTHER:
            return "SEE_OTHER";
        case NOT_MODIFIED:
            return "NOT_MODIFIED";
        case TEMPORARY_REDIRECT:
            return "TEMPORARY_REDIRECT";
        case BAD_REQUEST:
            return "BAD_REQUEST";
        case UNAUTHORIZED:
            return "UNAUTHORIZED";
        case FORBIDDEN:
            return "FORBIDDEN";
        case NOT_FOUND:
            return "NOT_FOUND";
        case CONFLICT:
            return "CONFLICT";
        case GONE:
            return "GONE";
        case PRECONDITION_FAILED:
            return "PRECONDITION_FAILED";
        case INTERNAL_SERVER_ERROR:
            return "INTERNAL_SERVER_ERROR";
        case NOT_IMPLEMENTED:
            return "NOT_IMPLEMENTED";
        case UNSUPPORTED_MEDIA_TYPE:
            return "UNSUPPORTED_MEDIA_TYPE";
        case SERVICE_UNAVAILABLE:
            return "SERVICE_UNAVAILABLE";
        }
        return null;
    }

    public  ResourceException(int code);
    public  ResourceException(int code, Object data);

}