FirestoreException constructor

FirestoreException({
  1. required FirestoreErrorCode errorCode,
  2. required String message,
  3. Object? cause,
  4. StackTrace? stackTrace,
})

Creates an exception with an errorCode and a message, optionally keeping the cause and a stack trace.

The SDK creates these exceptions; you need the constructor only for tests and fakes.

Implementation

FirestoreException({
  required this.errorCode,
  required String message,
  this.cause,
  super.stackTrace,
}) : super(plugin: 'cloud_firestore', code: errorCode.code, message: message);