-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathInternalException.vb
75 lines (59 loc) · 2.58 KB
/
InternalException.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
Imports System.ComponentModel
Namespace Microsoft.VisualStudio.Editors.Package
''' <summary>
''' Use this class sparingly. It should only be used when there really shouldn't be any reason that the code path
''' can be hit, even given invalid user input, etc. The default message for this error is "Unexpected error."
''' (obviously not very helpful, but it doesn't make sense to localize and doc messages for errors which shouldn't
''' be happening).
''' </summary>
''' <remarks></remarks>
<Serializable()>
Public Class InternalException
Inherits ApplicationException
''' <summary>
''' Constructor
''' </summary>
''' <remarks>Message defaults to "Unexpected error."</remarks>
Public Sub New()
Me.New(My.Resources.Designer.RSE_Err_InternalException, Nothing)
End Sub
''' <summary>
''' Constructor
''' </summary>
''' <param name="Message">The message for the exception.</param>
''' <remarks></remarks>
Public Sub New(Message As String)
Me.New(Message, Nothing)
End Sub
''' <summary>
''' Constructor
''' </summary>
''' <param name="InnerException">The inner exception, if any (Nothing = none).</param>
''' <remarks>Message defaults to "Unexpected error."</remarks>
Public Sub New(InnerException As Exception)
Me.New(My.Resources.Designer.RSE_Err_InternalException, InnerException)
End Sub
''' <summary>
''' Constructor
''' </summary>
''' <param name="Message">The message for the exception.</param>
''' <param name="InnerException">The inner exception, if any (Nothing = none).</param>
''' <remarks></remarks>
Public Sub New(Message As String, InnerException As Exception)
MyBase.New(Message, InnerException)
End Sub
#Region "Serialization support"
''' <summary>
''' Constructor used for serialization
''' </summary>
''' <param name="info"></param>
''' <param name="context"></param>
''' <remarks></remarks>
<EditorBrowsable(EditorBrowsableState.Advanced)>
Protected Sub New(info As System.Runtime.Serialization.SerializationInfo, context As System.Runtime.Serialization.StreamingContext)
MyBase.New(info, context)
End Sub
#End Region
End Class
End Namespace