File: exceptions.py

package info (click to toggle)
zeekctl 2.2.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,544 kB
  • sloc: python: 5,639; sh: 1,374; makefile: 71; awk: 24
file content (28 lines) | stat: -rw-r--r-- 1,268 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# ZeekControl exceptions.
#
# These are the exceptions that are expected to be raised under predictable
# circumstances (such as bad user input, or an invalid configuration).  When
# these are raised, a text message explaining the problem should be provided.
# Therefore, these should be caught to avoid seeing a stack trace (which
# provides no new information in these cases).  However, standard Python
# exceptions are not expected to occur, so if one is raised a stack trace
# can provide valuable information on the source of the problem.

class ZeekControlError(Exception):
    """This is the base class for ZeekControl exceptions."""

class LockError(ZeekControlError):
    """Indicates that ZeekControl was unable to obtain a lock."""

class RuntimeEnvironmentError(ZeekControlError):
    """Indicates an error in the runtime environment (e.g. running as wrong
    user, or some files/directories have wrong permissions or location)."""

class InvalidNodeError(ZeekControlError):
    """Indicates an attempt to lookup an invalid node name."""

class ConfigurationError(ZeekControlError):
    """Indicates a problem with the ZeekControl configuration."""

class CommandSyntaxError(ZeekControlError):
    """Indicates a syntax error in a ZeekControl command."""