# Class BiometricException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.codename1.security.BiometricException

public class BiometricException extends Exception
Thrown via the failure path of an `AsyncResource` returned by `Biometrics` or `SecureStorage` when the underlying biometric or keychain operation fails. `getError()` returns a typed `BiometricError` code so callers can react without string-matching.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BiometricException(BiometricError error)`
  `BiometricException(BiometricError error, String message)`
  `BiometricException(BiometricError error, String message, Throwable cause)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BiometricError`
  `getError()`
  Typed error code describing the failure.

  ### Methods inherited from class Throwable

  `addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### BiometricException

    public BiometricException(BiometricError error)

  - ### BiometricException

    public BiometricException(BiometricError error, String message)

  - ### BiometricException

    public BiometricException(BiometricError error, String message, Throwable cause)

- ## Method Details

  - ### getError

    public BiometricError getError()
    Typed error code describing the failure. Never `null`.