PartnerException Class

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.microsoft.store.partnercenter.exception.PartnerException

public class PartnerException extends RuntimeException

The standard exception thrown by the partner SDK. This pertains to errors accessing the partner service. Other standard exceptions such as null argument exceptions will also be thrown in case of malformed input.

Constructor Summary

Constructor Description
PartnerException()

Initializes a new instance of the PartnerException} class.

PartnerException(ApiFault apiFault, IRequestContext context)

Initializes a new instance of the PartnerException class.

PartnerException(ApiFault apiFault, IRequestContext context, PartnerErrorCategory errorCategory)
PartnerException(ApiFault apiFault, IRequestContext context, PartnerErrorCategory errorCategory, Exception innerException)
PartnerException(String message)

Initializes a new instance of the PartnerException class.

PartnerException(String message, IRequestContext context, PartnerErrorCategory errorCategory)

Initializes a new instance of the PartnerException class.

PartnerException(String message, IRequestContext context, PartnerErrorCategory errorCategory, Exception innerException)

Initializes a new instance of the PartnerException class.

PartnerException(String message, Exception innerException)

Initializes a new instance of the PartnerException class.

Method Summary

Modifier and Type Method and Description
IRequestContext getContext()
PartnerErrorCategory getErrorCategory()
ApiFault getServiceErrorPayload()
void setContext(IRequestContext value)
void setErrorCategory(PartnerErrorCategory value)
void setServiceErrorPayload(ApiFault value)
java.lang.String toString()

Displays the partner exception details.

Inherited Members

java.lang.Object.clone() java.lang.Object.equals(java.lang.Object) java.lang.Object.finalize() java.lang.Object.getClass() java.lang.Object.hashCode() java.lang.Object.notify() java.lang.Object.notifyAll() java.lang.Object.wait() java.lang.Object.wait(long) java.lang.Object.wait(long,int) java.lang.Throwable.addSuppressed(java.lang.Throwable) java.lang.Throwable.fillInStackTrace() java.lang.Throwable.getCause() java.lang.Throwable.getLocalizedMessage() java.lang.Throwable.getMessage() java.lang.Throwable.getStackTrace() java.lang.Throwable.getSuppressed() java.lang.Throwable.initCause(java.lang.Throwable) java.lang.Throwable.printStackTrace() java.lang.Throwable.printStackTrace(java.io.PrintStream) java.lang.Throwable.printStackTrace(java.io.PrintWriter) java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) java.lang.Throwable.toString()

Constructor Details

PartnerException

public PartnerException()

Initializes a new instance of the PartnerException} class.

PartnerException

public PartnerException(ApiFault apiFault, IRequestContext context)

Initializes a new instance of the PartnerException class.

Parameters:

apiFault - The API fault object returned by the partner service.
context - The partner context.

PartnerException

public PartnerException(ApiFault apiFault, IRequestContext context, PartnerErrorCategory errorCategory)

Parameters:

apiFault
context
errorCategory

PartnerException

public PartnerException(ApiFault apiFault, IRequestContext context, PartnerErrorCategory errorCategory, Exception innerException)

Parameters:

apiFault
context
errorCategory
innerException

PartnerException

public PartnerException(String message)

Initializes a new instance of the PartnerException class.

Parameters:

message - The exception message.

PartnerException

public PartnerException(String message, IRequestContext context, PartnerErrorCategory errorCategory)

Initializes a new instance of the PartnerException class.

Parameters:

message - The exception message.
context - The partner context.
errorCategory - The error category.

PartnerException

public PartnerException(String message, IRequestContext context, PartnerErrorCategory errorCategory, Exception innerException)

Initializes a new instance of the PartnerException class.

Parameters:

message - The exception message.
context - The partner context.
errorCategory - The error category.
innerException - The inner exception.

PartnerException

public PartnerException(String message, Exception innerException)

Initializes a new instance of the PartnerException class.

Parameters:

message - The exception message.
innerException - The exception that is the cause of the current exception, or a null reference if no inner exception is specified.

Method Details

getContext

public IRequestContext getContext()

getErrorCategory

public PartnerErrorCategory getErrorCategory()

getServiceErrorPayload

public ApiFault getServiceErrorPayload()

setContext

public void setContext(IRequestContext value)

Parameters:

value

setErrorCategory

public void setErrorCategory(PartnerErrorCategory value)

Parameters:

value

setServiceErrorPayload

public void setServiceErrorPayload(ApiFault value)

Parameters:

value

toString

public String toString()

Displays the partner exception details.

Overrides:

PartnerException.toString()

Returns:

A string representing the partner exception including the base and extended properties.

Applies to