Class ConnectorErrorHelperBuilder
- java.lang.Object
-
- com.snowflake.connectors.common.exception.helper.ConnectorErrorHelperBuilder
-
public class ConnectorErrorHelperBuilder extends Object
Builder for theConnectorErrorHelper
.Allows for customization of the following handler components:
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectorErrorHelper
build()
Builds a new error helper instance.ConnectorErrorHelperBuilder
withConnectorExceptionLogger(ExceptionLogger<ConnectorException> logger)
Sets the exception logger used for logging connector exceptions.ConnectorErrorHelperBuilder
withUnknownExceptionMapper(ExceptionMapper<Exception> mapper)
Sets the exception mapper used for mapping unknown (other thanConnectorException
) exceptions.
-
-
-
Method Detail
-
withUnknownExceptionMapper
public ConnectorErrorHelperBuilder withUnknownExceptionMapper(ExceptionMapper<Exception> mapper)
Sets the exception mapper used for mapping unknown (other thanConnectorException
) exceptions.- Parameters:
mapper
- exception mapper- Returns:
- this builder
-
withConnectorExceptionLogger
public ConnectorErrorHelperBuilder withConnectorExceptionLogger(ExceptionLogger<ConnectorException> logger)
Sets the exception logger used for logging connector exceptions.- Parameters:
logger
- exception logger- Returns:
- this builder
-
build
public ConnectorErrorHelper build()
Builds a new error helper instance.- Returns:
- new error helper instance
- Throws:
NullPointerException
- if any property for the new handler is null
-
-