-
Notifications
You must be signed in to change notification settings - Fork 1
/
error.go
48 lines (34 loc) · 1.05 KB
/
error.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
package errors
import "log"
func FatalPanic(errorText string, err error) {
log.Fatal(errorText, "\n", err)
panic(err)
}
type FileNotExistError struct{}
func (e FileNotExistError) Error() string {
return `File not exist!`
}
type VerbUnsoppertedError struct{}
func (e VerbUnsoppertedError) Error() string {
return `The verb is not unsopperted. You can check the valid verbs using command below:
$ fc --help`
}
type CodeMissingError struct{}
func (e CodeMissingError) Error() string {
return `Code could not be get, most probably code is missing!`
}
type FileMissingError struct{}
func (e FileMissingError) Error() string {
return `Files could not be get, most probably Files parameters are missing!`
}
type DownloadError struct{}
func (e DownloadError) Error() string {
return `Downloading is not succesfull!`
}
type VerbMissingArgumentsError struct{}
func (e VerbMissingArgumentsError) Error() string {
return `There are some missing arguments, There should be a verb and object
ex: fc upload a.txt b.txt
ex: fc get ut53
fc [verb] [object]`
}