Exceptions
The SDK provides the user a list of exceptions that they may use when calling any of the API's methods. This can come in handy when catching errors that will provide more details that are specific to the Brady SDK.
SdkApiException(String)
This is the base exception that will be extended by more specific exceptions (all listed below). Users are encouraged to catch only this base exception since this will successfully catch all other custom exceptions.
PrinterDiscoveryException(String)
Thrown when an error occurs related to printer discovery.
PrinterConnectionException(String)
Thrown when an error occurs related to printer connection.
TemplateNotLoadedException(String)
Thown when an error occurs when attempting to load a template.
InvalidPlaceholderDataException(String)
Thrown when an error is caused by invalid data being set to a template placeholder.
TemplateRenderingException(String)
Thrown when an error occurs while attempting to render template objects during getPreview() or the print() methods.
PrinterOperationException(String)
Thrown when an error occurs while attempting a printer operation such as feed, cut, of setAutomaticShutdownTime.
PrintingException(String)
Thrown when an error occurs at print time.
DisconnectionException(String)
Thrown when an error occurs while attempting to disconnect from a printer.
UnsupportedPrinterException(String)
Thrown when an error related to an incompatibility issue between the SDK and the connected printer occurs. The SDK might not support this printer.