[PR #265] [MERGED] Wrap file system export write in try/catch. #24089

Open
opened 2026-01-31 09:01:20 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/265
Author: @miniksa
Created: 10/2/2018
Status: Merged
Merged: 10/2/2018
Merged by: @miniksa

Base: masterHead: fix-accessdenied-write


📝 Commits (1)

  • e25ca32 Wrap file system export write in try/catch.

📊 Changes

1 file changed (+22 additions, -14 deletions)

View changed files

📝 tools/ColorTool/ColorTool/Program.cs (+22 -14)

📄 Description

@adiviness tried writing on a non-writeable network share and got a nice stack exception dump off the top.

As such, I'll wrap this with a try/catch and print the error message when the StreamWriter fails. He got an access denied, but I can think of a good dozen reasons this would fail. A catch all should be fine for now.

Also the string should be pre-localized.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/265 **Author:** [@miniksa](https://github.com/miniksa) **Created:** 10/2/2018 **Status:** ✅ Merged **Merged:** 10/2/2018 **Merged by:** [@miniksa](https://github.com/miniksa) **Base:** `master` ← **Head:** `fix-accessdenied-write` --- ### 📝 Commits (1) - [`e25ca32`](https://github.com/microsoft/terminal/commit/e25ca320223df57d70e6a30597e9cae84c1f5f4a) Wrap file system export write in try/catch. ### 📊 Changes **1 file changed** (+22 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `tools/ColorTool/ColorTool/Program.cs` (+22 -14) </details> ### 📄 Description @adiviness tried writing on a non-writeable network share and got a nice stack exception dump off the top. As such, I'll wrap this with a try/catch and print the error message when the StreamWriter fails. He got an access denied, but I can think of a good dozen reasons this would fail. A catch all should be fine for now. Also the string should be pre-localized. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:01:21 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#24089