src.pydasa.validations.error ============================ .. py:module:: src.pydasa.validations.error .. autoapi-nested-parse:: Module error.py =========================================== General error handling utilities for **PyDASA**. Functions --------- .. autoapisummary:: src.pydasa.validations.error.handle_error src.pydasa.validations.error.inspect_var Module Contents --------------- .. py:function:: handle_error(ctx, func, exc) Generic function to handle errors across the whole **PyDASA** library. :param ctx: The context (e.g., package/class) where the error occurred. :type ctx: str :param func: The name of the function or method where the error occurred. :type func: str :param exc: The exception that was raised. :type exc: Exception :raises TypeError: If the context is not a string. :raises TypeError: If the function name is not a string. :raises TypeError: If the exception is not an instance of Exception. :raises type: If the error message is not a string. .. py:function:: inspect_var(var) generic function to inspect a variable an gets its name in the source code. :param var: The variable to inspect. :type var: Any :returns: The name of the variable. :rtype: str :raises ValueError: If the variable name cannot be found in the current scope.