CreateError class

Handles a specific type of error, CreateError when it is thrown explicitly in a catch block

It returns a function that is invoked with the incoming request which sends a JSON payload to the client with the error details.

Implemented types

Constructors

CreateError.new({required String message, int errorCode = 500})
Constructs a CreateError instance.

Properties

errorCode int
HTTP status code (defaults to 400).
final
hashCode int
The hash code for this object.
no setterinherited
message String
Message to send to the client.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uri Uri?
no setteroverride

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