-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
errors.go
76 lines (53 loc) · 1.42 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
72
73
74
75
76
// Copyright 2015 Keybase, Inc. All rights reserved. Use of
// this source code is governed by the included BSD license.
package client
import "fmt"
type NoTerminalError struct{}
func (e NoTerminalError) Error() string {
return "No Terminal available"
}
type NotConfirmedError struct{}
func (e NotConfirmedError) Error() string {
return "Not confirmed"
}
type BadArgsError struct {
msg string
}
func (e BadArgsError) Error() string {
return "bad command-line arguments: " + e.msg
}
type CleanCancelError struct{}
func (e CleanCancelError) Error() string {
return "clean cancel"
}
type CanceledError struct{}
type BadServiceError struct {
n string
}
func (e BadServiceError) Error() string {
return e.n + ": unsupported service"
}
type BadUsernameError struct {
n string
}
func (e BadUsernameError) Error() string {
return "Bad username: '" + e.n + "'"
}
type InternalError struct {
m string
}
func (e InternalError) Error() string {
return "Internal error: " + e.m
}
type ProofNotYetAvailableError struct{}
func (e ProofNotYetAvailableError) Error() string {
return "Proof wasn't available; we'll keep trying"
}
type UnexpectedArgsError string
func (e UnexpectedArgsError) Error() string {
return fmt.Sprintf("Command `%s` doesn't take any non-flag arguments", string(e))
}
type CantRunInStandaloneError struct{}
func (e CantRunInStandaloneError) Error() string {
return "Can't run command in standalone mode"
}