@@ -165,7 +165,13 @@ Public Class ScannerUI
165
165
Dim CopyExAndClose As New RadTaskDialogButton With {
166
166
.Text = "Copy Exception and Close"
167
167
}
168
- AddHandler CopyExAndClose.Click, New EventHandler( Sub () My.Computer.Clipboard.SetText(ex.ToString))
168
+ AddHandler CopyExAndClose.Click, New EventHandler( Sub ()
169
+ Try
170
+ My.Computer.Clipboard.SetText(ex.ToString)
171
+ Catch clipex As Exception
172
+ 'Do nothing
173
+ End Try
174
+ End Sub )
169
175
170
176
Dim RTD As New RadTaskDialogPage With {
171
177
.Caption = " An Exception occurred" ,
@@ -255,32 +261,54 @@ Public Class ScannerUI
255
261
.RedirectStandardOutput = True 'Enables Redirection of Standard Output
256
262
End With
257
263
264
+ Dim RTD_SymChk As New RadTaskDialogPage With {
265
+ .Caption = " An Error occurred" ,
266
+ .Heading = "An Error occurred" ,
267
+ .Text = "An Error occurred while downloading the symbol files." & vbNewLine & vbNewLine & "Check if yo have access to symchk.exe and that your Antivirus isn't blocking it." ,
268
+ .Icon = RadTaskDialogIcon.ShieldErrorRedBar
269
+ }
270
+
258
271
'Get the .pdb files of C:\Windows\*.* - Recursively
259
- Proc.StartInfo.Arguments = "/r ""C:\Windows"" /oc """ & My.Settings.SymbolPath & """ /cn"
260
- Proc.Start()
261
- Proc.BeginErrorReadLine()
262
- Proc.BeginOutputReadLine()
263
- Proc.WaitForExit()
264
- Proc.CancelOutputRead()
265
- Proc.CancelErrorRead()
272
+ Try
273
+ Proc.StartInfo.Arguments = "/r ""C:\Windows"" /oc """ & My.Settings.SymbolPath & """ /cn"
274
+ Proc.Start()
275
+ Proc.BeginErrorReadLine()
276
+ Proc.BeginOutputReadLine()
277
+ Proc.WaitForExit()
278
+ Proc.CancelOutputRead()
279
+ Proc.CancelErrorRead()
280
+ Catch ex As Exception
281
+ 'Show the Message Box
282
+ RadTaskDialog.ShowDialog(RTD_SymChk)
283
+ End Try
266
284
267
285
'Get the .pdb files of C:\Program Files\*.* - Recursively
268
- Proc.StartInfo.Arguments = "/r ""C:\Program Files"" /oc """ & My.Settings.SymbolPath & """ /cn"
269
- Proc.Start()
270
- Proc.BeginErrorReadLine()
271
- Proc.BeginOutputReadLine()
272
- Proc.WaitForExit()
273
- Proc.CancelOutputRead()
274
- Proc.CancelErrorRead()
286
+ Try
287
+ Proc.StartInfo.Arguments = "/r ""C:\Program Files"" /oc """ & My.Settings.SymbolPath & """ /cn"
288
+ Proc.Start()
289
+ Proc.BeginErrorReadLine()
290
+ Proc.BeginOutputReadLine()
291
+ Proc.WaitForExit()
292
+ Proc.CancelOutputRead()
293
+ Proc.CancelErrorRead()
294
+ Catch ex As Exception
295
+ 'Show the Message Box
296
+ RadTaskDialog.ShowDialog(RTD_SymChk)
297
+ End Try
275
298
276
299
'Get the .pdb files of C:\Program Files (x86)\*.* - Recursively
277
- Proc.StartInfo.Arguments = "/r ""C:\Program Files (x86)"" /oc """ & My.Settings.SymbolPath & """ /cn"
278
- Proc.Start()
279
- Proc.BeginErrorReadLine()
280
- Proc.BeginOutputReadLine()
281
- Proc.WaitForExit()
282
- Proc.CancelOutputRead()
283
- Proc.CancelErrorRead()
300
+ Try
301
+ Proc.StartInfo.Arguments = "/r ""C:\Program Files (x86)"" /oc """ & My.Settings.SymbolPath & """ /cn"
302
+ Proc.Start()
303
+ Proc.BeginErrorReadLine()
304
+ Proc.BeginOutputReadLine()
305
+ Proc.WaitForExit()
306
+ Proc.CancelOutputRead()
307
+ Proc.CancelErrorRead()
308
+ Catch ex As Exception
309
+ 'Show the Message Box
310
+ RadTaskDialog.ShowDialog(RTD_SymChk)
311
+ End Try
284
312
285
313
'Disable the current tab and move to the Scan PDB Tab
286
314
Invoke( Sub ()
@@ -512,7 +540,13 @@ Public Class ScannerUI
512
540
Dim CopyExAndClose As New RadTaskDialogButton With {
513
541
.Text = "Copy Exception and Close"
514
542
}
515
- AddHandler CopyExAndClose.Click, New EventHandler( Sub () My.Computer.Clipboard.SetText(ex.ToString))
543
+ AddHandler CopyExAndClose.Click, New EventHandler( Sub ()
544
+ Try
545
+ My.Computer.Clipboard.SetText(ex.ToString)
546
+ Catch clipex As Exception
547
+ 'Do nothing
548
+ End Try
549
+ End Sub )
516
550
517
551
Dim RTD As New RadTaskDialogPage With {
518
552
.Caption = " An Exception occurred" ,
@@ -557,7 +591,13 @@ Public Class ScannerUI
557
591
Dim CopyExAndClose As New RadTaskDialogButton With {
558
592
.Text = "Copy Exception and Close"
559
593
}
560
- AddHandler CopyExAndClose.Click, New EventHandler( Sub () My.Computer.Clipboard.SetText(ex.ToString))
594
+ AddHandler CopyExAndClose.Click, New EventHandler( Sub ()
595
+ Try
596
+ My.Computer.Clipboard.SetText(ex.ToString)
597
+ Catch clipex As Exception
598
+ 'Do nothing
599
+ End Try
600
+ End Sub )
561
601
562
602
Dim RTD As New RadTaskDialogPage With {
563
603
.Caption = " An Exception occurred" ,
0 commit comments