TrustPinException class
Exception thrown by TrustPin operations.
This exception provides detailed error information for certificate validation failures and configuration issues. Use the convenience getters to check for specific error types programmatically.
- Implemented types
Constructors
- TrustPinException(String code, String message, [dynamic details])
-
Creates a new TrustPinException with the specified code and message.
const
- TrustPinException.fromPlatformException(dynamic error)
-
Creates a TrustPinException from a platform exception.
factory
Properties
- code → String
-
The error code identifying the type of error.
final
- details → dynamic
-
Additional error details (may be null).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAllPinsExpired → bool
-
Returns true if no usable pins remain for the given domain.
no setter
- isAlreadyInitialized → bool
-
Returns true if setup was called again on an already-initialized instance.
no setter
- isConfigIntegrityFailed → bool
-
Returns true if the downloaded configuration failed the SDK's integrity
check. Treat as a hard stop and do not retry blindly.
no setter
- isConfigurationValidationFailed → bool
-
Returns true if the configuration was rejected.
no setter
- isDomainNotRegistered → bool
-
Returns true if the domain is not configured (strict mode only).
no setter
- isErrorFetchingPinningInfo → bool
-
Returns true if pinning information could not be retrieved.
no setter
- isFetchCertificateTimeout → bool
-
Returns true if a certificate fetch or configuration wait exceeded its
timeout.
no setter
- isInvalidProjectConfig → bool
-
Returns true for an invalid project configuration error.
no setter
- isInvalidServerCert → bool
-
Returns true if the supplied certificate could not be parsed.
no setter
- isLockTimeout → bool
-
Returns true if the SDK could not acquire an internal lock within its
configured timeout. Treat as pathology: do not retry blindly.
Android only; iOS/macOS never produce this code.
no setter
- isPinsMismatch → bool
-
Returns true if the certificate was rejected for the given domain.
no setter
- isSetupInProgress → bool
-
Returns true if another
setupcall was already in flight on the same instance. Distinct from an invalid configuration — the credentials may be correct; wait for the in-flight setup to finish or retry after a brief delay. Android only; iOS/macOS never produce this code.no setter - isSslContextSetupFailed → bool
-
Returns true if the platform's TLS stack failed to initialize while
setting up the SDK's pinned socket factory or trust manager.
Android only; iOS/macOS never produce this code.
no setter
- isUnsupportedDevice → bool
-
Returns true if the SDK refused to operate because the runtime
environment is not a supported production Android device (for example
an emulator or a non-OEM OS image running a release build). Treat as a
hard stop; recovery is environmental, not code-side.
Android only; iOS/macOS never produce this code.
no setter
- message → String
-
Human-readable error message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited