Error Handling in Async Code
What error handling feature is demonstrated here?
async function* processStream(stream) {
try {
for await (const chunk of stream) {
yield await processChunk(chunk);
}
} catch (error) {
yield* handleStreamError(error);
} finally {
await stream.close();
}
}