forked from jorgebastida/awslogs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexceptions.py
33 lines (19 loc) · 872 Bytes
/
exceptions.py
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
29
30
31
32
33
class BaseAWSLogsException(Exception):
code = 1
def hint(self):
return "Unknown Error."
class UnknownDateError(BaseAWSLogsException):
code = 3
def hint(self):
return "awslogs doesn't understand '{0}' as a date.".format(self.args[0])
class TooManyStreamsFilteredError(BaseAWSLogsException):
code = 6
def hint(self):
return ("The number of streams that match your pattern '{0}' is '{1}'. "
"AWS API limits the number of streams you can filter by to {2}."
"It might be helpful to you to not filter streams by any "
"pattern and filter the output of awslogs.").format(*self.args)
class NoStreamsFilteredError(BaseAWSLogsException):
code = 7
def hint(self):
return ("No streams match your pattern '{0}' for the given time period.").format(*self.args)