SdkException

class SdkException(code: Int) : Exception

Exception class for LiG Scanner SDK errors and status notifications.

This exception encapsulates various error conditions and status updates that can occur during SDK initialization, authentication, and scanning operations. The statusCode property provides a structured way to handle different types of issues.

Usage Pattern: Most SDK operations report status through callbacks rather than throwing exceptions. This exception is primarily used internally and in the LiGScanner.onStatusReported callback.

Constructors

SdkException
Link copied to clipboard
fun SdkException(code: Int)

Types

StatusCode
Link copied to clipboard
enum StatusCode : Enum<SdkException.StatusCode>

Enumeration of all possible status codes reported by the LiG Scanner SDK.

Functions

addSuppressed
Link copied to clipboard
fun addSuppressed(p0: Throwable)
fillInStackTrace
Link copied to clipboard
open fun fillInStackTrace(): Throwable
getLocalizedMessage
Link copied to clipboard
open fun getLocalizedMessage(): String
getStackTrace
Link copied to clipboard
open fun getStackTrace(): Array<StackTraceElement>
getSuppressed
Link copied to clipboard
fun getSuppressed(): Array<Throwable>
initCause
Link copied to clipboard
open fun initCause(p0: Throwable): Throwable
printStackTrace
Link copied to clipboard
open fun printStackTrace()
open fun printStackTrace(p0: PrintStream)
open fun printStackTrace(p0: PrintWriter)
setStackTrace
Link copied to clipboard
open fun setStackTrace(p0: Array<StackTraceElement>)

Properties

cause
Link copied to clipboard
open val cause: Throwable?
code
Link copied to clipboard
val code: Int

The numeric status code value

message
Link copied to clipboard
open override val message: String
statusCode
Link copied to clipboard
val statusCode: SdkException.StatusCode

The structured StatusCode enum for easier handling