toString method

  1. @override
String toString()
override

Override the 'toString' method to provide a custom string representation of the exception.

Implementation

@override
String toString() {
  return message;
}