/** * Return debugging information. * Defaults to the stack trace. */ public String getDebugInfo() { return errorElement.getDebugInfo(); }
/** * Return error domain. * * <p>Defaults to "GData", indicating an error that has * not yet been upgraded to the new architecture. */ public String getDomainName() { String domainName = errorElement.getDomainName(); return (domainName != null) ? domainName : "GData"; }
/** * Return URI for extended help */ public String getExtendedHelp() { return errorElement.getExtendedHelp(); }
/** * Initializes the ServiceException using an {@link ErrorContent} object that * encapsulates most of the information about the error. Most ErrorContent * instances are declared in a subclass of {@link ErrorDomain} containing all * the errors for a GData domain (service or portion of service). */ public ServiceException(ErrorContent errorCode) { this(errorCode.getInternalReason()); this.errorElement = new ErrorElement(errorCode); }
/** * Set error code. * * @throws NullPointerException if {@code code} is {@code null}. */ public void setCode(String code) { errorElement.setCode(code); }
/** * Return error location type. */ public LocationType getLocationType() { return errorElement.getLocationType(); }
/** * Return error location. */ public String getLocation() { return errorElement.getLocation(); }
/** * Return error internal reason. * * <p>Defaults to the message set at construction time. */ public String getInternalReason() { String internalReason = errorElement.getInternalReason(); return (internalReason != null) ? internalReason : super.getMessage(); }
/** * Return error code. * * <p>Defaults to the class name of {@code this}. */ public String getCodeName() { String codeName = errorElement.getCodeName(); return (codeName != null) ? codeName : getClass().getSimpleName(); }
/** * Return URI to send report to. */ public String getSendReport() { return errorElement.getSendReport(); }
/** * Initializes the ServiceException using an {@link ErrorContent} object that * encapsulates most of the information about the error. Most ErrorContent * instances are declared in a subclass of {@link ErrorDomain} containing all * the errors for a GData domain (service or portion of service). */ public ServiceException(ErrorContent errorCode) { this(errorCode.getInternalReason()); this.errorElement = new ErrorElement(errorCode); }
/** * Set error code. * * @throws NullPointerException if {@code code} is {@code null}. */ public void setCode(String code) { errorElement.setCode(code); }
/** * Return error location type. */ public LocationType getLocationType() { return errorElement.getLocationType(); }
/** * Return error location. */ public String getLocation() { return errorElement.getLocation(); }
/** * Return error internal reason. * * <p>Defaults to the message set at construction time. */ public String getInternalReason() { String internalReason = errorElement.getInternalReason(); return (internalReason != null) ? internalReason : super.getMessage(); }
/** * Return error code. * * <p>Defaults to the class name of {@code this}. */ public String getCodeName() { String codeName = errorElement.getCodeName(); return (codeName != null) ? codeName : getClass().getSimpleName(); }
/** * Return URI to send report to. */ public String getSendReport() { return errorElement.getSendReport(); }
/** * Initializes the ServiceException using an {@link ErrorContent} object that * encapsulates most of the information about the error. Most ErrorContent * instances are declared in a subclass of {@link ErrorDomain} containing all * the errors for a GData domain (service or portion of service). */ public ServiceException(ErrorContent errorCode) { super(nullsafe(errorCode.getInternalReason())); httpHeaders = new HashMap<String, List<String>>(); this.errorElement = new ErrorElement(errorCode); }
/** * Set error code. * * @throws NullPointerException if {@code code} is {@code null}. */ public void setCode(String code) { errorElement.setCode(code); }
/** * Return error domain. * * <p>Defaults to "GData", indicating an error that has * not yet been upgraded to the new architecture. */ public String getDomainName() { String domainName = errorElement.getDomainName(); return (domainName != null) ? domainName : "GData"; }