snowmobile.core.errors¶
snowmobile exception classes.
Module Contents¶
- exception
snowmobile.core.errors.Error(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
ExceptionBase Generic exception class.
- Parameters
msg (Optional[str]) – Error message.
errno (Optional[int]) – Error number.
nm (Optional[str]) – Globally unique name for an exception being raised; used for InternalExceptions and statement names when QA failures occur.
to_raise (Optional[bool]) – Indicates that the exception should be raised before exiting the current context.
-
raised¶ Indicator of whether or not the instance has already been raised; used for exception chaining from Statement -> Script.
- Type
Initialize self. See help(type(self)) for accurate signature.
-
escalate(self)¶ Raises error.
- static
format_error_args(prefix: Optional[str] = None, sep: Optional[str] = None, lines: Optional[int] = None, _filter: bool = True, **kwargs: Dict[str, str]) → str¶ Formats a dictionary of arguments into an aligned/indented error msg.
Placed below primary msg such that a primary msg of ‘This is a __ error.’ combined with the returned value from this method provided with kwargs={‘argument-description1’: ‘argument-value’, ‘arg2-desc’: ‘arg2-value’} would produce the following error message:
- Parameters
prefix (str) – Character to prefix bullets with; defaults to ‘ ‘.
sep (str) – Character to separate arguments/values with; defaults to ‘:’.
lines (int) – Number of lines to include between arguments; defaults to 1.
_filter (bool) – Indicator of whether to filter out key/value pairs that contain empty values; defaults to True.
**kwargs – Argument keys and values to be converted into a list.
- Returns (str):
Formatted arguments as a string.
- exception
snowmobile.core.errors.InternalError(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorExceptions raised from an internal state that should not exist.
Debugging/testing Exceptions only.
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.StatementInternalError(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.InternalErrorStatement-specific internal errors.
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.StatementPostProcessingError(msg: Optional[str] = None, errno: Optional[int] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorExceptions encountered in post-processing invoked by s.process().
Indicates a non-database error occurred in
.process()method of a derivedStatementclass.Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.QAFailure(nm: str, msg: str, idx: int, desc: Optional[str] = None, errno: Optional[int] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorBoolean eval of a statement’s outcome attribute is False.
Indicates the logic invoked by the
.process()method completed successfully and has set theoutcomeattribute to False.- Parameters
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.QAEmptyFailure(nm: str, msg: str, idx: int, desc: Optional[str] = None, errno: Optional[int] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.QAFailureEmptyspecific failure.Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.QADiffFailure(nm: str, msg: str, idx: int, desc: Optional[str] = None, errno: Optional[int] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.QAFailureDiffspecific failure.Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.SnowFrameInternalError(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.InternalErrorclass:~snowmobile.core.snowframe.SnowFrame specific internal error.
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.StatementNotFoundError(nm: str, statements: List[str] = None, msg: Optional[str] = None, errno: Optional[int] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorInvalid statement name or index has been pr.
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.DuplicateTagError(nm: str, msg: Optional[str] = None, errno: Optional[int] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorDuplicate statement name specified within a script.
Is only raised if a duplicate statement name exists and a method is invoked that tries to access statement(s) by their name as opposed to index position.
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.LoadingInternalError(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.InternalErrorException boundaries for
Table.Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.ExistingTableError(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorTable exists and if_exists=Fail
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.ColumnMismatchError(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorColumns do not match and if_exists!=’replace’
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.FileFormatNameError(nm: str, statements: List[str] = None, msg: Optional[str] = None, errno: Optional[int] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.StatementNotFoundErrorThe name of the provided file format is invalid.
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.InvalidTagsError(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorError to be raised when a given statement wrap is not valid.
Initialize self. See help(type(self)) for accurate signature.
- exception
snowmobile.core.errors.SnowflakeObjectNotFound(msg: Optional[str] = None, errno: Optional[int] = None, nm: Optional[str] = None, to_raise: Optional[bool] = False)¶ Bases:
snowmobile.core.errors.ErrorError to be raised when a schema object is not found by snowmobile.core.sql.
Initialize self. See help(type(self)) for accurate signature.
-
snowmobile.core.errors.db_errors¶
-
snowmobile.core.errors.snowmobile_errors¶