Changes since
the last release

com.ebay.sdk
Class ApiException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.ebay.sdk.SdkException
              extended by com.ebay.sdk.ApiException
All Implemented Interfaces:
Serializable

public class ApiException
extends SdkException

Represents one or more errors reported by an API call. Note that an API call can also return warnings, which do not trigger an ApiException.

Title:

Description:

Copyright: Copyright (c) 2004

Company: eBay Inc.

Version:
1.0
Author:
Weijun Li & William Yang
See Also:
Serialized Form

Constructor Summary
ApiException()
          Constructor.
ApiException(ErrorType[] errors)
          Constructor.
 
Method Summary
 boolean containsErrorCode(String errorCode)
           
 ErrorType[] getErrors()
          Get list of errors included in the exception.
 String getLocalizedMessage()
          Overrides Exception.getLocalizedMessage().
 String getMessage()
          Overrides Exception.getMessage().
 int getSeverityErrorCount()
          Count number of errors with the severity of SeverityCodeType.ERROR in the error list.
 int getSeverityWarningCount()
          Count number of errors with the severity of SeverityCodeType.WARNING in the error list.
 void setErrors(ErrorType[] errors)
          Set list of errors to be included in the exception.
 
Methods inherited from class com.ebay.sdk.SdkException
getInnerThrowable
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApiException

public ApiException()
Constructor.


ApiException

public ApiException(ErrorType[] errors)
Constructor.

Parameters:
errors - The array of errors of the exception.
Method Detail

getErrors

public ErrorType[] getErrors()
Get list of errors included in the exception.

Returns:
ErrorType[]

setErrors

public void setErrors(ErrorType[] errors)
Set list of errors to be included in the exception.

Parameters:
errors - ErrorType[]

getSeverityErrorCount

public int getSeverityErrorCount()
Count number of errors with the severity of SeverityCodeType.ERROR in the error list.

Returns:
int

getSeverityWarningCount

public int getSeverityWarningCount()
Count number of errors with the severity of SeverityCodeType.WARNING in the error list.

Returns:
int

getMessage

public String getMessage()
Overrides Exception.getMessage().

Overrides:
getMessage in class SdkException
Returns:
String

getLocalizedMessage

public String getLocalizedMessage()
Overrides Exception.getLocalizedMessage().

Overrides:
getLocalizedMessage in class Throwable
Returns:
String

containsErrorCode

public boolean containsErrorCode(String errorCode)

Changes since
the last release

The information contained in this document is proprietary and confidential. Use of this information and the eBay API requires a Non-Disclosure Agreement (NDA) between the user and eBay Inc. For information regarding a qualifying NDA, contact Developer Relations: developer-relations@ebay.com
© 2004-2009 eBay Inc. All rights reserved.