# Google Data APIs Client Library (1.43.0)

## com.google.gdata.util
Class ServiceExceptionInitializer

    java.lang.Object
      com.google.gdata.util.ServiceExceptionInitializer

    public class ServiceExceptionInitializer

extends java.lang.Object

The ServiceExceptionInitializer class is used to initialize a ServiceException from either an HTTP connection or an XML structured error represented as a string.

Constructor Summary
`ServiceExceptionInitializer(ServiceException se)`

Method Summary
`void` `parse(ContentType contentType, java.lang.String body)`
`void` `parse(java.net.HttpURLConnection httpConn)` Initializes the ServiceException using the error response data from an HTTP connection.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ServiceExceptionInitializer

    public ServiceExceptionInitializer(ServiceException se)

Method Detail

### parse

    public void parse(java.net.HttpURLConnection httpConn)
               throws ParseException,
                      java.io.IOException

  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.

  Parameters:
    `httpConn` - is the http connection from which the error message (structured or simple) is read
  Throws:
    `java.io.IOException` - if network error receiving the error response
    `ParseException`

### parse

    public void parse(ContentType contentType,
                      java.lang.String body)
               throws ParseException

  Throws:
    `ParseException`