visitThrowExpression method
Visit a SThrowExpression.
Implementation
@override
Object? visitThrowExpression(SThrowExpression node) {
// 1. Evaluate the expression that is thrown
final thrownValue = node.expression!.accept<Object?>(this);
// 2. Create and throw an InternalInterpreterException.
final message = stringify(thrownValue); // Keep for debug log
Logger.debug("[SThrowExpression] Throwing (original value): $message");
// Throw the specific internal exception, wrapping the original value
throw InternalInterpreterD4rtException(thrownValue);
// We don't capture stack trace here, the 'catch' block does it.
}