public ServiceException(String message) { super(nullsafe(message)); httpHeaders = new HashMap<String, List<String>>(); }
public ServiceException(String message) { super(nullsafe(message)); httpHeaders = new HashMap<String, List<String>>(); }
public ServiceException(String message) { super(nullsafe(message)); httpHeaders = new HashMap<String, List<String>>(); }
public ServiceException(String message, Throwable cause) { super(nullsafe(message), cause); httpHeaders = new HashMap<String, List<String>>(); }
public ServiceException(Throwable cause) { super(nullsafe(cause.getMessage())); httpHeaders = new HashMap<String, List<String>>(); }
/** * 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); }
/** * Initializes the ServiceException using an {@link ErrorContent} object that * encapsulates most of the information about the error, and an embedded * exception. Most ErrorContent instances are declared in a subclass of * {@link ErrorDomain} containing all the errors for this GData domain * (service or portion of service). */ public ServiceException(ErrorContent errorCode, Throwable cause) { super(nullsafe(errorCode.getInternalReason()), cause); httpHeaders = new HashMap<String, List<String>>(); this.errorElement = new ErrorElement(errorCode); }
/** * Initializes the ServiceException using the error response data from an * HTTP connection. This constructor is used in the client library * to approximately reconstitute the constructor as it appeared * in the server. * <p>This constructor uses a ServiceExceptionInitializer to do * the work of parsing the connection and calling our setters to * initialize our fields. The initializer object may also create * sibling ServiceExceptions. * @param httpConn is the http connection from which the error message * (structured or simple) is read * @throws IOException if network error receiving the error response */ public ServiceException(HttpURLConnection httpConn) throws IOException { super(nullsafe(httpConn.getResponseMessage())); ServiceExceptionInitializer initializer = new ServiceExceptionInitializer(this); try { initializer.parse(httpConn); } catch (ParseException pe) { // Clean up after failed parse errorElement = new ErrorElement(); siblings.clear(); siblings.add(this); responseContentType = ContentType.TEXT_PLAIN; } }
/** * Initializes the ServiceException using the error response data from an * HTTP connection. This constructor is used in the client library * to approximately reconstitute the constructor as it appeared * in the server. * <p>This constructor uses a ServiceExceptionInitializer to do * the work of parsing the connection and calling our setters to * initialize our fields. The initializer object may also create * sibling ServiceExceptions. * @param httpConn is the http connection from which the error message * (structured or simple) is read * @throws IOException if network error receiving the error response */ public ServiceException(HttpURLConnection httpConn) throws IOException { super(nullsafe(httpConn.getResponseMessage())); ServiceExceptionInitializer initializer = new ServiceExceptionInitializer(this); try { initializer.parse(httpConn); } catch (ParseException pe) { // Clean up after failed parse errorElement = new ErrorElement(); siblings.clear(); siblings.add(this); responseContentType = ContentType.TEXT_PLAIN; } }
/** * Initializes the ServiceException using the error response data from an * HTTP connection. This constructor is used in the client library * to approximately reconstitute the constructor as it appeared * in the server. * <p>This constructor uses a ServiceExceptionInitializer to do * the work of parsing the connection and calling our setters to * initialize our fields. The initializer object may also create * sibling ServiceExceptions. * @param httpConn is the http connection from which the error message * (structured or simple) is read * @throws IOException if network error receiving the error response */ public ServiceException(HttpURLConnection httpConn) throws IOException { super(nullsafe(httpConn.getResponseMessage())); ServiceExceptionInitializer initializer = new ServiceExceptionInitializer(this); try { initializer.parse(httpConn); } catch (ParseException pe) { // Clean up after failed parse errorElement = new ErrorElement(); siblings.clear(); siblings.add(this); responseContentType = ContentType.TEXT_PLAIN; } }