BotError<CTX extends Context> constructor

BotError<CTX extends Context>({
  1. required Object error,
  2. required StackTrace? stackTrace,
  3. CTX? ctx,
})

Creates a new bot error.

Parameters:

  • error: The original error that occurred
  • stackTrace: The original stack trace
  • ctx: The context in which the error occurred

Implementation

BotError({
  required this.error,
  required super.stackTrace,
  this.ctx,
}) : super(
        'Bot error occurred: $error',
        description: _buildDescription(error, ctx),
        type: TeleverseExceptionType.requestFailed,
      );