Skip to content

Commit 7801c18

Browse files
rmarinhoCopilot
andcommitted
Log exception in GetEmulatorAvdNameAsync bare catch block
Address review feedback: replace bare catch with catch(Exception ex) and log via Trace.WriteLine for debuggability. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 9c9b885 commit 7801c18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Xamarin.Android.Tools.AndroidSdk/Runners/AdbRunner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ public async Task<IReadOnlyList<AdbDeviceInfo>> ListDevicesAsync (CancellationTo
116116
}
117117
} catch (OperationCanceledException) {
118118
throw;
119-
} catch {
120-
// Silently ignore failures (emulator may not support this command)
119+
} catch (Exception ex) {
120+
Trace.WriteLine ($"GetEmulatorAvdNameAsync failed for '{serial}': {ex.Message}");
121121
}
122122

123123
return null;

0 commit comments

Comments
 (0)