@@ -66,10 +66,12 @@ static NativeApi()
6666
6767 // Array types needed for Enum.GetValues<T> used by reflection in ThermoFisher static constructors
6868 var arr1 = new ThermoFisher . CommonCore . Data . Interfaces . MetaFilterType [ 0 ] ;
69+ var arr2 = new ThermoFisher . CommonCore . Data . Business . Device [ 0 ] ;
6970 }
7071
7172 [ DynamicDependency ( DynamicallyAccessedMemberTypes . All , typeof ( ThermoFisher . CommonCore . Data . Interfaces . MetaFilterType ) ) ]
7273 [ DynamicDependency ( DynamicallyAccessedMemberTypes . All , typeof ( ThermoFisher . CommonCore . Data . Interfaces . IScanFilter ) ) ]
74+ [ DynamicDependency ( DynamicallyAccessedMemberTypes . All , "ThermoFisher.CommonCore.Data.Business.Device" , "ThermoFisher.CommonCore.Data" ) ]
7375
7476 private static IScanEvent ResolveScanEvent ( int handle , int scanNumber )
7577 {
@@ -148,7 +150,7 @@ public static int GetNumScans(int handle)
148150 }
149151 catch ( Exception ex )
150152 {
151- Console . Error . WriteLine ( "[native-fisher-py] Exception in GetNumScans: " + ex . Message ) ;
153+ Console . Error . WriteLine ( "[native-fisher-py] Exception in GetNumScans: " + ex . ToString ( ) ) ;
152154 return - 1 ;
153155 }
154156 }
@@ -1601,7 +1603,7 @@ public static int GetStatusLogCount(int handle)
16011603 }
16021604 catch ( Exception ex )
16031605 {
1604- Console . Error . WriteLine ( "[native-fisher-py] Exception in GetStatusLogCount (fallback -1): " + ex . Message ) ;
1606+ Console . Error . WriteLine ( "[native-fisher-py] Exception in GetStatusLogCount (fallback -1): " + ex . ToString ( ) ) ;
16051607 return - 1 ;
16061608 }
16071609 }
@@ -1651,7 +1653,7 @@ public static int GetTrailerExtraCount(int handle)
16511653 }
16521654 catch ( Exception ex )
16531655 {
1654- Console . Error . WriteLine ( "[native-fisher-py] Exception in GetTrailerExtraCount (fallback -1): " + ex . Message ) ;
1656+ Console . Error . WriteLine ( "[native-fisher-py] Exception in GetTrailerExtraCount (fallback -1): " + ex . ToString ( ) ) ;
16551657 return - 1 ;
16561658 }
16571659 }
@@ -2924,7 +2926,10 @@ public static void SelectInstrument(int handle, int deviceType, int deviceNumber
29242926 }
29252927 catch ( Exception ex )
29262928 {
2927- Console . Error . WriteLine ( "[native-fisher-py] Exception in SelectInstrument (ignored): " + ex . Message ) ;
2929+ if ( ex . GetType ( ) . Name != "NullReferenceException" )
2930+ {
2931+ Console . Error . WriteLine ( "[native-fisher-py] Exception in SelectInstrument (ignored): " + ex . Message ) ;
2932+ }
29282933 }
29292934 }
29302935
0 commit comments