Skip to content

Commit 47e6e84

Browse files
committed
Add warning instead of failing silently
Log a warning when a VCI_E_ACCESSDENIED error is returned from a driver function call.
1 parent 84b139d commit 47e6e84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

can/interfaces/ixxat/canlib.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ def __check_status(result: int, function: Callable, args: Tuple):
126126
elif result == constants.VCI_E_NO_MORE_ITEMS:
127127
raise StopIteration()
128128
elif result == constants.VCI_E_ACCESSDENIED:
129-
pass # not a real error, might happen if another program has initialized the bus
129+
log.warning(f"VCI_E_ACCESSDENIED error raised when calling VCI Function {function._name}")
130+
# not a real error, might happen if another program has initialized the bus
130131
elif result != constants.VCI_OK:
131132
raise VCIError(vciFormatError(function, result))
132133

0 commit comments

Comments
 (0)