diff --git a/scripts/Invoke-ReplaySave.ps1 b/scripts/Invoke-ReplaySave.ps1 index 4882a27..16530a1 100644 --- a/scripts/Invoke-ReplaySave.ps1 +++ b/scripts/Invoke-ReplaySave.ps1 @@ -71,7 +71,10 @@ try { return $true } catch { - Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [ERROR] Save failed: $_" + $inner = $_.Exception.InnerException + while ($inner.InnerException) { $inner = $inner.InnerException } + $msg = if ($inner) { $inner.Message } else { $_.Exception.Message } + Write-Host "$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss') [ERROR] Save failed: $msg" return $false } finally {