Changeset 602
- Timestamp:
- Aug 21, 2008, 11:01:02 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/ablib/src/Classes/System/Exception.ab
r559 r602 33 33 InvalidProgramException 34 34 MemberAccessException 35 FieldAccessException 36 MethodAccessException 37 MissingMemberException 35 FieldAccessException 36 MethodAccessException 37 MissingMemberException 38 38 MulticastNotSupportedException 39 39 NullReferenceException … … 99 99 */ 100 100 Override Function ToString() As String 101 If Object.ReferenceEquals(toStr, Nothing) Then 101 Imports ActiveBasic.Strings.Detail 102 If ActiveBasic.IsNothing(toStr) Then 102 103 Dim sb = New System.Text.StringBuilder 103 sb.Append(GetType().FullName).Append(": ") 104 sb.Append(Message) 105 toStr = sb.ToString 104 With sb 105 .Append(GetType().FullName).Append(": ") 106 .Append(Message) 107 .Append(" (Error code: ") 108 .Append(FormatIntegerX(hr As DWord, 8, 0, BPrefix)) 109 Dim s = ActiveBasic.Windows.HResultToString(hr) 110 If Not String.IsNullOrEmpty(s) Then 111 .Append(" ").Append(s) 112 End If 113 .Append(")") 114 toStr = .ToString 115 End With 106 116 End If 107 117 Return toStr
Note:
See TracChangeset
for help on using the changeset viewer.