Coverage for polypandas/exceptions.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2026-02-24 14:21 -0500

1"""Custom exceptions for polypandas.""" 

2 

3 

4class PolypandasError(Exception): 

5 """Base exception for polypandas.""" 

6 

7 pass 

8 

9 

10class PandasNotAvailableError(PolypandasError): 

11 """Raised when pandas is required but not installed.""" 

12 

13 def __init__( 

14 self, 

15 message: str = "pandas is not installed. Install it with: pip install pandas", 

16 ): 

17 super().__init__(message) 

18 

19 

20class SchemaInferenceError(PolypandasError): 

21 """Raised when schema cannot be inferred from a type.""" 

22 

23 pass 

24 

25 

26class UnsupportedTypeError(PolypandasError): 

27 """Raised when a type is not supported for conversion.""" 

28 

29 pass