Coverage for polypandas/exceptions.py: 100%

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

2

3

4 class PolypandasError(Exception):

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

6

7 pass

8

9

10 class 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

20 class SchemaInferenceError(PolypandasError):

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

22

23 pass

24

25

26 class UnsupportedTypeError(PolypandasError):

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

28

29 pass