fix: verify apply duplicate and capture runtime failures

This commit is contained in:
codex
2026-08-04 16:35:42 +03:00
parent 86cabb584b
commit 68f500692c
3 changed files with 18 additions and 6 deletions
@@ -218,6 +218,8 @@ public sealed class EntryPoint : IExtensionApplication
}
catch (System.Exception exception)
{
if (string.Equals(commandName, "PXP-OA", StringComparison.OrdinalIgnoreCase) && string.Equals(Environment.GetEnvironmentVariable("P_REC_ANNOT_RUNTIME_MODE"), "Apply", StringComparison.OrdinalIgnoreCase))
ScriptDrivenFirstApplyAutomation.RecordApplyFailure(exception);
RuntimeDiagnostics.Write("CommandFailed", "ERROR", operationId, commandName, exception.Message, exception, document);
WriteUsage(operationId, commandName, exception.Message, document, null, stopwatch.ElapsedMilliseconds, exception);
WriteEditor(document, $"\nP_Rec_Annot: безопасная диагностика завершилась ошибкой: {exception.Message}");