Class PGExceptionFactory (0.9.0)

public class PGExceptionFactory

Factory class for PGException instances.

Inheritance

java.lang.Object > PGExceptionFactory

Static Methods

newPGException(String message)

public static PGException newPGException(String message)
Parameter
Name Description
message String
Returns
Type Description
PGException

newPGException(String message, SQLState sqlState)

public static PGException newPGException(String message, SQLState sqlState)

Creates a basic PGException with Severity#ERROR and the specified SQLState.

Parameters
Name Description
message String
sqlState SQLState
Returns
Type Description
PGException

newQueryCancelledException()

public static PGException newQueryCancelledException()

Creates a new exception that indicates that the current query was cancelled by the client.

Returns
Type Description
PGException

toPGException(SpannerException spannerException)

public static PGException toPGException(SpannerException spannerException)

Converts the given SpannerException to a PGException.

Parameter
Name Description
spannerException com.google.cloud.spanner.SpannerException
Returns
Type Description
PGException

toPGException(Exception exception)

public static PGException toPGException(Exception exception)

Converts the given Exception to a PGException.

Parameter
Name Description
exception Exception
Returns
Type Description
PGException