Skip to content

Commit a87990e

Browse files
authored
Merge pull request #53546 from rodrigoaatmicrosoft/patch-2
Adding exception handling in UDX docs
2 parents d509014 + f4cec05 commit a87990e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

articles/stream-analytics/functions-overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,13 @@ Azure Stream Analytics does not keep a record of all functions invocations and r
4242

4343
Any runtime errors are considered fatal and are surfaced through activity and resource logs. It is recommended that your function handles all exceptions and errors and return a valid result to your query. This will prevent your job from going to a [Failed state](job-states.md).
4444

45+
## Exception handling
46+
47+
Any exception during data processing is considered a catastrophic failure when consuming data in Azure Stream Analytics. User-defined functions have a higher potential to throw exceptions and cause the processing to stop. To avoid this issue, use a *try-catch* block in JavaScript or C# to catch exceptions during code execution. Exceptions that are caught can be logged and treated without causing a system failure. You are encouraged to always wrap your custom code in a *try-catch* block to avoid throwing unexpected exceptions to the processing engine.
4548

4649
## Next steps
4750

4851
* [JavaScript user-defined functions in Azure Stream Analytics](stream-analytics-javascript-user-defined-functions.md)
4952
* [Azure Stream Analytics JavaScript user-defined aggregates](stream-analytics-javascript-user-defined-aggregates.md)
5053
* [Develop .NET Standard user-defined functions for Azure Stream Analytics jobs](stream-analytics-edge-csharp-udf-methods.md)
5154
* [Integrate Azure Stream Analytics with Azure Machine Learning](machine-learning-udf.md)
52-

0 commit comments

Comments
 (0)