Open mickvikt opened 1 year ago
The way to trigger an error the proper way is to simply raise an exception in the operator where the issue occurs :)
If you want more information about the reason and location of the failure:
var res = await processRunner.ExecuteAsync(args[0], executionOptions);
if (res.ErrorTraceEvent.Content is UnhandledExceptionStreamTraceContent unhandledExceptionStreamTraceContent)
{
Console.WriteLine($"Error occurred in node {res.ErrorTraceEvent.NodeName}(type {res.ErrorTraceEvent.NodeTypeName}): {unhandledExceptionStreamTraceContent.Message} (exception: {unhandledExceptionStreamTraceContent.Exception})");
}
Console.Write(res.Failed ? "Failed" : "Succeeded");
In the initial stage of our data processing pipeline, we verify the presence of a predefined set of files. If any of these files are missing, we need to raise an error. Is there a recommended practice for triggering errors, such as invoking a specific method, or is raising an exception the sole approach for handling this situation? Thank you