logFatal method

  1. @override
void logFatal(
  1. String message, [
  2. Map<String, String>? extras
])
override

Pong alerts the developer that a fatal error has just occurred and that it might be the last messages that he and the developer exchange before the program halts.

Implementation

@override
void logFatal(String message, [Map<String, String>? extras]) {
  _print('Oh no, this is bad. (个_个)');

  _print(
    'I was contacted that a fatal error occurred within the app. This may be the last message that I exchange with you. Before I release the message, I got to ask you: Was I a good bot? (。•́︿•̀。)',
  );

  _print('The fatal messages says:\n\n* $message');

  if (extras != null && extras.isNotEmpty) {
    _print('\nThe fatality also contains several attachements:\n');

    extras.forEach(
      (key, value) {
        _print('* $key: $value');
      },
    );
  }
}