NetworkIsolationViolation class final

Thrown when code running under NetworkIsolationGuard attempts to open a real socket. Extends Error (not Exception) so catch (e) blocks that are not explicitly isolating network access do not silently swallow the certification failure.

Inheritance
Available extensions

Constructors

NetworkIsolationViolation(String operation, String host, int port)

Properties

hashCode int
The hash code for this object.
no setterinherited
host String
The host the code tried to reach.
final
operation String
The blocked operation, e.g. Socket.connect or HttpClient.connect.
final
port int
The port the code tried to reach.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
The stack trace at the point where this error was first thrown.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toFailure([StackTrace? stackTrace]) AppFailure

Available on Error, provided by the ErrorToFailure extension

Convert this error to an AppFailure
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited