File tree Expand file tree Collapse file tree 2 files changed +30
-6
lines changed
Rubberduck.VBEditor.VB6/SafeComWrappers/VB
Rubberduck.VBEditor.VBA/SafeComWrappers/VB Expand file tree Collapse file tree 2 files changed +30
-6
lines changed Original file line number Diff line number Diff line change
1
+ using System . Runtime . InteropServices ;
1
2
using Rubberduck . VBEditor . SafeComWrappers . Abstract ;
2
3
using VB = Microsoft . Vbe . Interop . VB6 ;
3
4
@@ -49,9 +50,8 @@ public string FullPath
49
50
{
50
51
return IsBroken ? string . Empty : Target . FullPath ;
51
52
}
52
- catch ( System . Runtime . InteropServices . COMException )
53
+ catch ( COMException )
53
54
{
54
-
55
55
return string . Empty ;
56
56
}
57
57
}
@@ -64,7 +64,19 @@ public bool IsBuiltIn
64
64
65
65
public bool IsBroken
66
66
{
67
- get { return IsWrappingNullReference || Target . IsBroken ; }
67
+ get
68
+ {
69
+ try
70
+ {
71
+ return IsWrappingNullReference || Target . IsBroken ;
72
+ }
73
+ catch ( COMException ex )
74
+ {
75
+ _logger . Trace ( ex , "IsBroken is broken." ) ;
76
+ }
77
+
78
+ return true ;
79
+ }
68
80
}
69
81
70
82
public ReferenceKind Type
Original file line number Diff line number Diff line change
1
+ using System . Runtime . InteropServices ;
1
2
using Rubberduck . VBEditor . SafeComWrappers . Abstract ;
2
3
using VB = Microsoft . Vbe . Interop ;
3
4
@@ -49,9 +50,8 @@ public string FullPath
49
50
{
50
51
return IsBroken ? string . Empty : Target . FullPath ;
51
52
}
52
- catch ( System . Runtime . InteropServices . COMException )
53
+ catch ( COMException )
53
54
{
54
-
55
55
return string . Empty ;
56
56
}
57
57
}
@@ -64,7 +64,19 @@ public bool IsBuiltIn
64
64
65
65
public bool IsBroken
66
66
{
67
- get { return IsWrappingNullReference || Target . IsBroken ; }
67
+ get
68
+ {
69
+ try
70
+ {
71
+ return IsWrappingNullReference || Target . IsBroken ;
72
+ }
73
+ catch ( COMException ex )
74
+ {
75
+ _logger . Trace ( ex , "IsBroken is broken." ) ;
76
+ }
77
+
78
+ return true ;
79
+ }
68
80
}
69
81
70
82
public ReferenceKind Type
You can’t perform that action at this time.
0 commit comments