logError method

  1. @override
void logError(
  1. dynamic exception, [
  2. dynamic stacktrace
])
override

Pong will alert the developer that an error arose, requiring the program to be fixed ASAP.

Implementation

@override
void logError(dynamic exception, [dynamic stacktrace]) {
  _print(
    'Oh nooooo it seems your program broke a piece or two and threw an exception (。•́︿•̀。)',
  );

  _print(
    "Don't worry, I'm here to help! ٩(。•́‿•̀。)۶. I've kept the exception just so you can repair it later. (b ᵔ▽ᵔ)b",
  );

  _print(
    '''

*  The exception is as follow:
*  $exception
  ''',
  );

  if (stacktrace != null) {
    _print(
      '''Oh! And here's also the stacktrace: ( ˙▿˙ )\n\n$stacktrace''',
    );
  }
}