We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 796e11e + 7e431b9 commit 1ece036Copy full SHA for 1ece036
1 file changed
deps/winpty/src/agent/Agent.cc
@@ -223,10 +223,18 @@ Agent::Agent(LPCWSTR controlPipeName,
223
224
Agent::~Agent()
225
{
226
- trace("Agent::~Agent entered");
227
- agentShutdown();
228
- if (m_childProcess != NULL) {
229
- CloseHandle(m_childProcess);
+ trace("Agent::~Aent entered");
+ try {
+ agentShutdown();
+ if (m_childProcess != NULL) {
230
+ CloseHandle(m_childProcess);
231
+ }
232
+ } catch (const std::exception &e) {
233
+ // Log the exception or handle it as needed
234
+ trace("Exception in Agent::~Agent: %s", e.what());
235
+ } catch (...) {
236
+ // Catch any other types of exceptions
237
+ trace("Unknown exception in Agent::~Agent");
238
}
239
240
0 commit comments