Source code for plaso.lib.errors

# -*- coding: utf-8 -*-
"""This file contains the error classes."""

from __future__ import unicode_literals


[docs]class Error(Exception): """Base error class."""
[docs]class BadConfigObject(Error): """Raised when the configuration object is of the wrong type."""
[docs]class BadConfigOption(Error): """Raised when a faulty configuration option is encountered."""
[docs]class ConnectionError(Error): # pylint: disable=redefined-builtin """Error connecting to a service."""
[docs]class InvalidEvent(Error): """Error indicating an event is malformed."""
[docs]class InvalidFilter(Error): """Error indicating an invalid filter was specified."""
[docs]class InvalidNumberOfOperands(Error): """The number of operands provided to an objectfilter operator is wrong."""
[docs]class MalformedPresetError(Error): """Raised when a parser preset definition is malformed."""
[docs]class MaximumRecursionDepth(Error): """Raised when the maximum recursion depth is reached."""
[docs]class NoFormatterFound(Error): """Raised when no formatter is found for a particular event object."""
[docs]class ParseError(Error): """Raised when a parse error occurred."""
[docs]class PreProcessFail(Error): """Raised when a preprocess module is unable to gather information."""
[docs]class QueueAlreadyClosed(Error): """Raised when an attempt is made to close a queue that is already closed."""
[docs]class QueueAlreadyStarted(Error): """Raised when an attempt is made to start queue that is already started."""
[docs]class QueueClose(Error): """Class that implements a queue close exception."""
[docs]class QueueEmpty(Error): """Class that implements a queue empty exception."""
[docs]class QueueFull(Error): """Class that implements a queue full exception."""
[docs]class SerializationError(Error): """Class that defines serialization errors."""
[docs]class SourceScannerError(Error): """Class that defines source scanner errors."""
[docs]class TaggingFileError(Error): """Raised when the tagging file is invalid."""
[docs]class TimestampError(Error): """Class that defines timestamp errors."""
[docs]class UnableToLoadRegistryHelper(Error): """Raised when unable to load a Registry helper object."""
[docs]class UnableToParseFile(Error): """Raised when a parser is not designed to parse a file."""
[docs]class UserAbort(Error): """Class that defines an user initiated abort exception."""
[docs]class WrongBencodePlugin(Error): """Error reporting wrong bencode plugin used."""
[docs]class WrongCompoundZIPPlugin(Error): """Error reporting wrong compound ZIP plugin used."""
[docs]class WrongFormatter(Error): """Raised when the formatter is not applicable for a particular event."""
[docs]class WrongPlugin(Error): """Raised when the plugin is of the wrong type."""
[docs]class WrongQueueType(Error): """Raised when an unsupported operation is attempted on a queue. For example, attempting to Pop from a Push-only queue. """