Commit e898048
chore(diagnostic): log exception type + stack trace when polling-engine outer catch fires
Captures Exception.GetType().FullName, Message, ScriptStackTrace,
.NET StackTrace, and InnerException details to
%TEMP%/mcp-polling-engine-error.log on each outer-catch hit.
Triggered by an intermittent "Operation is not valid due to the
current state of the object" the user saw whose source isn't yet
identified. Without a stack trace we can only guess between
Format-McpOutput, Get-Location, the Console.SetOut/SetError restore
sequence, the _externalUI reflection swap, or PSReadLine timing.
The log will pin it to the failing line on next reproduction.
Wrapped in try/catch so any failure of the diagnostic itself (file
I/O, Add-Content lock contention) cannot mask or replace the
original exception that brought us into this catch.
REMOVE this block once the underlying cause has been identified and
fixed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 80ea624 commit e898048
1 file changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
898 | 933 | | |
899 | 934 | | |
900 | 935 | | |
| |||
0 commit comments