getExceptionValue method

dynamic getExceptionValue(
  1. dynamic exception
)

Implementation

dynamic getExceptionValue(dynamic exception) {
  if (exception is JSCustomException) {
    return exception.value;
  } else if (exception is JSException) {
    return exception.message;
  } else {
    return exception.toString();
  }
}