PreconditionFailedException class

The class PreconditionFailedException is used to throw a precondition failed exception

Example:

throw PreconditionFailedException();

The message parameter is optional and is used to define the message of the exception

The uri parameter is optional and is used to define the uri of the exception

The statusCode is 412

Inheritance

Constructors

PreconditionFailedException([String message = 'Precondition Failed!', Uri? uri])
The PreconditionFailedException constructor is used to throw a precondition failed exception
const

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
The statusCode parameter is used to define the status code of the exception
finalinherited
uri Uri?
finalinherited

Methods

copyWith({String? message, Uri? uri, int? statusCode}) SerinusException
Creates a copy of the current SerinusException with the given parameters.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts the object to a JSON object.
inherited
toString() String
A string representation of this object.
inherited

Operators

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