mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fix if/else if consistency for error event handlers per code review feedback
Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/c5d77400-d7ed-4fbe-9103-f5d74aabcf2b Co-authored-by: lokitoth <6936551+lokitoth@users.noreply.github.com>
This commit is contained in:
co-authored by
lokitoth
parent
f5ef6e761f
commit
61fc80178f
@@ -65,8 +65,7 @@ public static class Program
|
||||
Console.Error.WriteLine(workflowError.Exception?.ToString() ?? "Unknown workflow error occurred.");
|
||||
Console.ResetColor();
|
||||
}
|
||||
|
||||
if (evt is ExecutorFailedEvent executorFailed)
|
||||
else if (evt is ExecutorFailedEvent executorFailed)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Error.WriteLine($"Executor '{executorFailed.ExecutorId}' failed with {(executorFailed.Data == null ? "unknown error" : $"exception {executorFailed.Data}")}.");
|
||||
@@ -107,8 +106,7 @@ public static class Program
|
||||
Console.Error.WriteLine(workflowError.Exception?.ToString() ?? "Unknown workflow error occurred.");
|
||||
Console.ResetColor();
|
||||
}
|
||||
|
||||
if (evt is ExecutorFailedEvent executorFailed)
|
||||
else if (evt is ExecutorFailedEvent executorFailed)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Error.WriteLine($"Executor '{executorFailed.ExecutorId}' failed with {(executorFailed.Data == null ? "unknown error" : $"exception {executorFailed.Data}")}.");
|
||||
|
||||
@@ -62,8 +62,7 @@ public static class Program
|
||||
Console.Error.WriteLine(workflowError.Exception?.ToString() ?? "Unknown workflow error occurred.");
|
||||
Console.ResetColor();
|
||||
}
|
||||
|
||||
if (evt is ExecutorFailedEvent executorFailed)
|
||||
else if (evt is ExecutorFailedEvent executorFailed)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Error.WriteLine($"Executor '{executorFailed.ExecutorId}' failed with {(executorFailed.Data == null ? "unknown error" : $"exception {executorFailed.Data}")}.");
|
||||
@@ -101,8 +100,7 @@ public static class Program
|
||||
Console.Error.WriteLine(workflowError.Exception?.ToString() ?? "Unknown workflow error occurred.");
|
||||
Console.ResetColor();
|
||||
}
|
||||
|
||||
if (evt is ExecutorFailedEvent executorFailed)
|
||||
else if (evt is ExecutorFailedEvent executorFailed)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Error.WriteLine($"Executor '{executorFailed.ExecutorId}' failed with {(executorFailed.Data == null ? "unknown error" : $"exception {executorFailed.Data}")}.");
|
||||
|
||||
@@ -105,8 +105,7 @@ public static class Program
|
||||
Console.Error.WriteLine(workflowError.Exception?.ToString() ?? "Unknown workflow error occurred.");
|
||||
Console.ResetColor();
|
||||
}
|
||||
|
||||
if (evt is ExecutorFailedEvent executorFailed)
|
||||
else if (evt is ExecutorFailedEvent executorFailed)
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Red;
|
||||
Console.Error.WriteLine($"Executor '{executorFailed.ExecutorId}' failed with {(executorFailed.Data == null ? "unknown error" : $"exception {executorFailed.Data}")}.");
|
||||
|
||||
Reference in New Issue
Block a user