# Class ShieldException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
com.codename1.security.shield.ShieldException

public class ShieldException extends IOException

Raised when a shield operation cannot produce a usable token, or when a request to a protected host is refused because its certificate chain matched no configured pin.

Extends `IOException` so it flows through the normal `ConnectionRequest` error path rather than needing its own handling. Always check `getStatus()` before deciding what to show the user: `ShieldStatus.isTransient()` distinguishes "could not reach the service" from "this device was rejected", and those deserve very different UX.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ShieldException(ShieldStatus status, String message)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ShieldStatus`
  `getStatus()`
  Why the operation failed.

  ### Methods inherited from class Throwable

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

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### ShieldException

    public ShieldException(ShieldStatus status, String message)

- ## Method Details

  - ### getStatus

    public ShieldStatus getStatus()
    Why the operation failed. Never null.