File tree 1 file changed +18
-8
lines changed
1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -791,14 +791,24 @@ def get_application_config(
791
791
hw_channel = ctypes .c_uint ()
792
792
_app_channel = ctypes .c_uint (app_channel )
793
793
794
- xldriver .xlGetApplConfig (
795
- app_name .encode (),
796
- _app_channel ,
797
- hw_type ,
798
- hw_index ,
799
- hw_channel ,
800
- xldefine .XL_BusTypes .XL_BUS_TYPE_CAN ,
801
- )
794
+ try :
795
+ xldriver .xlGetApplConfig (
796
+ app_name .encode (),
797
+ _app_channel ,
798
+ hw_type ,
799
+ hw_index ,
800
+ hw_channel ,
801
+ xldefine .XL_BusTypes .XL_BUS_TYPE_CAN ,
802
+ )
803
+ except VectorError as e :
804
+ raise VectorInitializationError (
805
+ error_code = e .error_code ,
806
+ error_string = (
807
+ f"Vector HW Config: Channel '{ app_channel } ' of "
808
+ f"application '{ app_name } ' is not assigned to any interface"
809
+ ),
810
+ function = "xlGetApplConfig" ,
811
+ ) from None
802
812
return xldefine .XL_HardwareType (hw_type .value ), hw_index .value , hw_channel .value
803
813
804
814
@staticmethod
You can’t perform that action at this time.
0 commit comments