visitThrow method

  1. @override
dynamic visitThrow(
  1. ThrowStatement node
)

Implementation

@override
visitThrow(ThrowStatement node) {
  dynamic argumentValue = getValueFromExpression(node.argument);
  if (argumentValue is JSCustomException) {
    throw argumentValue;
  } else {
    throw JSCustomException(argumentValue);
  }
}