Repository navigation
Expand file tree
/
Copy pathErrObject.xml
More file actions
482 lines (399 loc) · 29.8 KB
/
Copy pathErrObject.xml
File metadata and controls
482 lines (399 loc) · 29.8 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
<Type Name="ErrObject" FullName="Microsoft.VisualBasic.ErrObject">
<TypeSignature Language="C#" Value="public sealed class ErrObject" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed ErrObject extends System.Object" />
<TypeSignature Language="DocId" Value="T:Microsoft.VisualBasic.ErrObject" />
<TypeSignature Language="VB.NET" Value="Public NotInheritable Class ErrObject" />
<TypeSignature Language="C++ CLI" Value="public ref class ErrObject sealed" />
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<summary>The <see langword="ErrObject" /> module contains properties and procedures used to identify and handle run-time errors using the <see langword="Err" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `ErrObject` module supports the `Err` object. For more information, see <xref:Microsoft.VisualBasic.Information.Err%2A>.
## Examples
This example uses the properties of the `Err` object in constructing an error-message dialog box. Notice what happens when you use the `Clear` method first: When you then generate a Visual Basic error with the `Raise` method, Visual Basic's default values become the properties of the `Err` object.
```vb
Dim Msg As String
' If an error occurs, construct an error message.
On Error Resume Next ' Defer error handling.
Err.Clear
Err.Raise(6) ' Generate an "Overflow" error.
' Check for error, then show message.
If Err.Number <> 0 Then
Msg = "Error # " & Str(Err.Number) & " was generated by " _
& Err.Source & ControlChars.CrLf & Err.Description
MsgBox(Msg, MsgBoxStyle.Information, "Error")
End If
```
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
</Docs>
<Members>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.VisualBasic.ErrObject.Clear" />
<MemberSignature Language="VB.NET" Value="Public Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:
 void Clear();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.Success)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Security.SecuritySafeCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Clears all property settings of the <see langword="Err" /> object.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Use `Clear` to explicitly clear the `Err` object after an error has been handled, such as when you use deferred error handling with `On Error Resume Next`. The `Clear` method is called automatically whenever any of the following statements executes:
- Any type of `Resume` statement
- `Exit Sub`, `Exit Function`, or `Exit Property`
- Any `On Error` statement
- Any `Try...Catch...Finally` statement
> [!NOTE]
> The `On Error Resume Next` construct may be preferable to `On Error GoTo` when handling errors generated during access to other objects. Checking `Err` after each interaction with an object removes ambiguity about which object was accessed by the code: You can be sure which object placed the error code in `Err.Number`, as well as which object originally generated the error (the object specified in `Err.Source`).
## Examples
This example uses the `Err` object's `Clear` method to reset the numeric properties of the `Err` object to zero and its string properties to zero-length strings. Without the call to `Clear`, the second call to `MsgBox` would display the same error message.
[!code-vb[VbVbalrErrorHandling#4](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#4)]
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
<Member MemberName="Description">
<MemberSignature Language="C#" Value="public string Description { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Description" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.ErrObject.Description" />
<MemberSignature Language="VB.NET" Value="Public Property Description As String" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Description { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns or sets a <see langword="String" /> expression containing a descriptive string associated with an error. Read/write.</summary>
<value>Returns or sets a <see langword="String" /> expression containing a descriptive string associated with an error. Read/write.</value>
<remarks>
<format type="text/markdown"><]
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
<Member MemberName="Erl">
<MemberSignature Language="C#" Value="public int Erl { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Erl" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.ErrObject.Erl" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Erl As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 property int Erl { int get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns an integer indicating the line number of the last executed statement. Read-only.</summary>
<value>Returns an integer indicating the line number of the last executed statement. Read-only.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If Visual Basic encounters no line numbers, it returns 0.
## Examples
This example uses the `Erl` property to indicate the line number.
```
10: On Error Resume Next
20: Err.Raise(60000)
' Returns 20.
30: MsgBox(Erl())
```
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
<Member MemberName="GetException">
<MemberSignature Language="C#" Value="public Exception GetException ();" />
<MemberSignature Language="ILAsm" Value=".method public instance class System.Exception GetException() cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.VisualBasic.ErrObject.GetException" />
<MemberSignature Language="VB.NET" Value="Public Function GetException () As Exception" />
<MemberSignature Language="C++ CLI" Value="public:
 Exception ^ GetException();" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Exception</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Returns the exception representing the error that occurred.</summary>
<returns>Returns the exception representing the error that occurred.</returns>
<remarks>
<format type="text/markdown"><]
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
<Member MemberName="HelpContext">
<MemberSignature Language="C#" Value="public int HelpContext { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 HelpContext" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.ErrObject.HelpContext" />
<MemberSignature Language="VB.NET" Value="Public Property HelpContext As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 property int HelpContext { int get(); void set(int value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns or sets an <see langword="Integer" /> containing the context ID for a topic in a Help file. Read/write.</summary>
<value>Returns or sets an <see langword="Integer" /> containing the context ID for a topic in a Help file. Read/write.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The `HelpContext` property is used to display context-sensitive Help for an application. If a Help file is specified in `HelpFile`, the `HelpContext` property is used to automatically display the Help file identified. If both the `HelpFile` and `HelpContext` properties are empty, the value of the <xref:Microsoft.VisualBasic.ErrObject.Number%2A> property is checked. If the value of the `Number` property corresponds to a Visual Basic run-time error value, then the Visual Basic Help context ID for the error is used. If the value of the `Number` property does not correspond to a Visual Basic error, the contents screen for the Visual Basic Help file is displayed.
> [!NOTE]
> You should write routines in your application to handle typical errors. When programming with an object, you can use the object's Help file to improve the quality of your error handling, or to display a meaningful message to your user if the error is not recoverable.
## Examples
This example uses the `HelpContext` property of the `Err` object to show the Visual Basic Help topic for the `Overflow` error.
[!code-vb[VbVbalrErrorHandling#7](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#7)]
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
<Member MemberName="HelpFile">
<MemberSignature Language="C#" Value="public string HelpFile { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string HelpFile" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.ErrObject.HelpFile" />
<MemberSignature Language="VB.NET" Value="Public Property HelpFile As String" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ HelpFile { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns or sets a <see langword="String" /> expression containing the fully qualified path to a Help file. Read/write.</summary>
<value>Returns or sets a <see langword="String" /> expression containing the fully qualified path to a Help file. Read/write.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If a Help file is specified by the `HelpFile` property, it is automatically called when the user presses the Help key (or the F1 key) in the error message dialog box. If the `HelpContext` property contains a valid context ID for the specified file, that topic is automatically displayed. If no `HelpFile` is specified, the Visual Basic Help file is displayed.
> [!NOTE]
> You should write routines in your application to handle typical errors. When programming with an object, you can use the object's Help file to improve the quality of your error handling, or to display a meaningful message to your user if the error is not recoverable.
## Examples
This example uses the `HelpFile` property of the `Err` object to start the Help system. By default, the `HelpFile` property contains the name of the Visual Basic Help file.
[!code-vb[VbVbalrErrorHandling#7](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#7)]
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
<Member MemberName="LastDllError">
<MemberSignature Language="C#" Value="public int LastDllError { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 LastDllError" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.ErrObject.LastDllError" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property LastDllError As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 property int LastDllError { int get(); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>get: System.Security.SecurityCritical</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns a system error code produced by a call to a dynamic-link library (DLL). Read-only.</summary>
<value>Returns a system error code produced by a call to a dynamic-link library (DLL). Read-only.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:Microsoft.VisualBasic.ErrObject.LastDllError%2A> property applies only to DLL calls made from Visual Basic code. When such a call is made, the called function usually returns a code indicating success or failure, and the <xref:Microsoft.VisualBasic.ErrObject.LastDllError%2A> property is filled. Check the documentation for the DLL's functions to determine the return values that indicate success or failure. Whenever the failure code is returned, the Visual Basic application should immediately check the <xref:Microsoft.VisualBasic.ErrObject.LastDllError%2A> property. No exception is raised when the <xref:Microsoft.VisualBasic.ErrObject.LastDllError%2A> property is set.
> [!NOTE]
> The <xref:Microsoft.VisualBasic.ErrObject.LastDllError%2A> property is protected by <xref:System.Security.Permissions.SecurityAction.LinkDemand>, which helps prevent it from being accessed from untrusted code. However, <xref:System.Security.Permissions.SecurityAction.LinkDemand> requires only the immediate caller to have <xref:System.Security.Permissions.SecurityPermissionAttribute.UnmanagedCode%2A> permission. If your code can be called from partially trusted code, exposing the value of <xref:Microsoft.VisualBasic.ErrObject.LastDllError%2A> without validation is a security risk.
>
> For important limitations about how to use the <xref:System.Security.Permissions.SecurityAction.LinkDemand> member, see [Demand vs. LinkDemand](http://msdn.microsoft.com/library/1ab877f2-70f4-4e0d-8116-943999dfe8f5). For more information about permissions, see <xref:System.Security.Permissions.SecurityPermission> and [Code Access Permissions](http://msdn.microsoft.com/library/e5ae402f-6dda-4732-bbe8-77296630f675).
Note For smart devices this property always returns zero.
## Examples
The following example shows how you can use the `LastDllError` property after calling a function in the Windows API. The `PrintWindowCoordinates` procedure takes a handle to a window and calls the `GetWindowRect` function. `GetWindowRect` fills the RECT data structure with the lengths of the sides of the rectangle that make up the window. If you pass an invalid handle, an error occurs, and the error number is available through the `LastDllError` property.
[!code-vb[VbVbalrErrorHandling#8](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#8)]
[!code-vb[VbVbalrErrorHandling#9](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#9)]
[!code-vb[VbVbalrErrorHandling#10](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#10)]
[!code-vb[VbVbalrErrorHandling#11](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#11)]
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
<Member MemberName="Number">
<MemberSignature Language="C#" Value="public int Number { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Number" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.ErrObject.Number" />
<MemberSignature Language="VB.NET" Value="Public Property Number As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 property int Number { int get(); void set(int value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns or sets a numeric value specifying an error. Read/write.</summary>
<value>Returns or sets a numeric value specifying an error. Read/write.</value>
<remarks>
<format type="text/markdown"><]
## Examples
This example illustrates a typical use of the `Number` property in an error-handling routine.
[!code-vb[VbVbalrErrorHandling#12](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#12)]
This example uses the `Err` object's `Raise` method to generate an original error within a function written in Visual Basic. The calling function can catch the error and report it to the user. Notice that procedure `CallingProcedure` contrasts the type of information that you can derive from an `Err` object with the information that you can derive from an `Exception` object.
[!code-vb[VbVbalrErrorHandling#14](~/samples/snippets/visualbasic/VS_Snippets_VBCSharp/VbVbalrErrorHandling/VB/Class1.vb#14)]
]]></format>
</remarks>
<exception cref="T:System.ArgumentException">
<paramref name="Number" /> is greater than 65535.</exception>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
<Member MemberName="Raise">
<MemberSignature Language="C#" Value="public void Raise (int Number, object Source = null, object Description = null, object HelpFile = null, object HelpContext = null);" />
<MemberSignature Language="ILAsm" Value=".method public instance void Raise(int32 Number, object Source, object Description, object HelpFile, object HelpContext) cil managed" />
<MemberSignature Language="DocId" Value="M:Microsoft.VisualBasic.ErrObject.Raise(System.Int32,System.Object,System.Object,System.Object,System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Sub Raise (Number As Integer, Optional Source As Object = null, Optional Description As Object = null, Optional HelpFile As Object = null, Optional HelpContext As Object = null)" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="Number" Type="System.Int32" />
<Parameter Name="Source" Type="System.Object" />
<Parameter Name="Description" Type="System.Object" />
<Parameter Name="HelpFile" Type="System.Object" />
<Parameter Name="HelpContext" Type="System.Object" />
</Parameters>
<Docs>
<param name="Number">Required. <see langword="Long" /> integer that identifies the nature of the error. Visual Basic errors are in the range 0–65535; the range 0–512 is reserved for system errors; the range 513–65535 is available for user-defined errors. When setting the <see langword="Number" /> property to your own error code in a class module, you add your error code number to the <see langword="vbObjectError" /> constant. For example, to generate the error number 513, assign <c>vbObjectError + 513</c> to the <see langword="Number" /> property.</param>
<param name="Source">Optional. <see langword="String" /> expression naming the object or application that generated the error. When setting this property for an object, use the form <c>project</c>.<c>class</c>. If <c>Source</c> is not specified, the process ID of the current Visual Basic project is used.</param>
<param name="Description">Optional. <see langword="String" /> expression describing the error. If unspecified, the value in the <see langword="Number" /> property is examined. If it can be mapped to a Visual Basic run-time error code, the string that would be returned by the <see langword="Error" /> function is used as the <see langword="Description" /> property. If there is no Visual Basic error corresponding to the <see langword="Number" /> property, the "Application-defined or object-defined error" message is used.</param>
<param name="HelpFile">Optional. The fully qualified path to the Help file in which help on this error can be found. If unspecified, Visual Basic uses the fully qualified drive, path, and file name of the Visual Basic Help file.</param>
<param name="HelpContext">Optional. The context ID identifying a topic within <c>HelpFile</c> that provides help for the error. If omitted, the Visual Basic Help-file context ID for the error corresponding to the <see langword="Number" /> property is used, if it exists.</param>
<summary>Generates a run-time error; can be used instead of the <see langword="Error" /> statement.</summary>
<remarks>
<format type="text/markdown"><]
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
<altmember cref="T:System.ArgumentException" />
</Docs>
</Member>
<Member MemberName="Source">
<MemberSignature Language="C#" Value="public string Source { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Source" />
<MemberSignature Language="DocId" Value="P:Microsoft.VisualBasic.ErrObject.Source" />
<MemberSignature Language="VB.NET" Value="Public Property Source As String" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::String ^ Source { System::String ^ get(); void set(System::String ^ value); };" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>Microsoft.VisualBasic</AssemblyName>
<AssemblyVersion>10.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>Returns or sets a <see langword="String" /> expression specifying the name of the object or application that originally generated the error. Read/write.</summary>
<value>Returns or sets a <see langword="String" /> expression specifying the name of the object or application that originally generated the error. Read/write.</value>
<remarks>
<format type="text/markdown"><]
]]></format>
</remarks>
<altmember cref="M:Microsoft.VisualBasic.Information.Err" />
<altmember cref="M:Microsoft.VisualBasic.Conversion.ErrorToString" />
</Docs>
</Member>
</Members>
</Type>