rootCaughtException property Null safety

CaughtException rootCaughtException

Recursively unwrap this CaughtException if it itself contains a CaughtException.

If it does not contain a CaughtException, simply return this instance.

Implementation

CaughtException get rootCaughtException {
  if (exception is CaughtException) {
    return (exception as CaughtException).rootCaughtException;
  }
  return this;
}