-
Notifications
You must be signed in to change notification settings - Fork 4
/
errors.go
71 lines (57 loc) · 1.7 KB
/
errors.go
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package gommand
// CommandNotFound is the error which is thrown when a command is not found.
type CommandNotFound struct {
err string
}
// Error is used to give the error description.
func (c *CommandNotFound) Error() string {
return c.err
}
// CommandBlank is the error which is thrown when the command is blank.
type CommandBlank struct {
err string
}
// Error is used to give the error description.
func (c *CommandBlank) Error() string {
return c.err
}
// CommandOnCooldown is the error which is thrown when a command is on cooldown.
type CommandOnCooldown struct {
Message string
}
// Error is used to give the error description.
func (c *CommandOnCooldown) Error() string {
return c.Message
}
// IncorrectPermissions is the error which is thrown when the user does not have enough permissions.
type IncorrectPermissions struct {
err string
}
// Error is used to give the error description.
func (c *IncorrectPermissions) Error() string {
return c.err
}
// InvalidArgCount is the error when the arg count is not correct.
type InvalidArgCount struct {
err string
}
// Error is used to give the error description.
func (c *InvalidArgCount) Error() string {
return c.err
}
// InvalidTransformation is the error argument parsers should use when they can't transform.
type InvalidTransformation struct {
Description string
}
// Error is used to give the error description.
func (c *InvalidTransformation) Error() string {
return c.Description
}
// PanicError is used when a string is returned from a panic. If it isn't a string, the error will just be pushed into the handler.
type PanicError struct {
msg string
}
// Error is used to give the error description.
func (c *PanicError) Error() string {
return c.msg
}