Commit 5f56e25
[dotnet] Quit fails after not successful new session (SeleniumHQ#14242)
* [dotnet] do not execute Quit command when sessionId is not available
If new session creation fails a Quit() method is called which calls Dispose and then Quit command, unfortunately in this case
session is still not created and it throws null reference exception and this hides the actual exception
* [dotnet] ignore exceptions from Quit when new session fails
In order to propagate the original error when session fails, surround the Quit call in try/catch in case it also throws an exception.
---------
Co-authored-by: Nikolay Borisenko <[email protected]>1 parent 19eb047 commit 5f56e25
1 file changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
67 | 74 | | |
68 | 75 | | |
69 | 76 | | |
| |||
703 | 710 | | |
704 | 711 | | |
705 | 712 | | |
706 | | - | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
707 | 717 | | |
708 | 718 | | |
709 | 719 | | |
| |||
0 commit comments