getCause method

  1. @override
Object getCause()
override

The cause of this exception, if any.

It defaults to the exception itself if not provided.

Implementation

@override
Object getCause() => cause ?? this;