59
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 Partial Public Class LoadExceptionViewer
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
2 Inherits UserControl
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
3
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
4 Public Sub New()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
5 InitializeComponent()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
6 End Sub
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
7
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 Public Sub New(ByVal e As Exception, ByVal strSourceLocation As String)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9 InitializeComponent()
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10 Me.txtSourceLocation.Text = String.Concat("Source Location: ", strSourceLocation)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
11
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
12 Dim ex As Exception = e
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14 While ex IsNot Nothing
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15 Me.lbExceptions.Items.Add(ex)
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
16 ex = ex.InnerException
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 End While
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19 If Me.lbExceptions.Items.Count > 0 Then
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20 Me.lbExceptions.SelectedIndex = 0
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 End If
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23 End Sub
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
25 End Class
|