Coverage for ibllib/exceptions.py: 94%

18 statements  

« prev     ^ index     » next       coverage.py v7.5.4, created at 2024-07-08 17:16 +0100

1class IblError(Exception): 

2 explanation = '' 

3 

4 def __init__(self, *args): 

5 if args: 1b

6 self.message = args[0] 

7 else: 

8 self.message = None 1b

9 

10 def __str__(self): 

11 return f"{self.message} \n {self.explanation} " 1b

12 

13 

14class SyncBpodWheelException(IblError): 

15 explanation = "The bpod can't be synchronized with the Rotary Encoder." 

16 

17 

18class SyncBpodFpgaException(IblError): 

19 explanation = "The bpod can't be synchronized with the FPGA." 

20 

21 

22class Neuropixel3BSyncFrontsNonMatching(IblError): 

23 explanation = (" When the npy files containing sync pulses for probes do not match with nidq." 

24 "In 3B, this indicates that either the binary files is corrupt," 

25 "either the extracted sync files are corrupt.") 

26 

27 

28class NvidiaDriverNotReady(IblError): 

29 explanation = ('Nvidia driver does not respond. This usually means the GPU is inaccessible ' 

30 'and needs to be recovered through a system reboot.') 

31 

32 

33class WidefieldWiringException(IblError): 

34 explanation = ("LED wiring in data is not found in the wiring map. Check that correct wiring map is being used.")