-
Notifications
You must be signed in to change notification settings - Fork 437
/
errors.rb
93 lines (76 loc) · 2.14 KB
/
errors.rb
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
module Travis
module Build
class CompilationError < StandardError
attr_accessor :doc_path
def initialize(msg = '')
@msg = msg
end
def to_s
@msg
end
end
class EnvVarDefinitionError < CompilationError
def initialize(msg = "Environment variables definition is incorrect.")
super
end
def doc_path
'/user/environment-variables'
end
end
class DeployConfigError < CompilationError
def initialize(msg = "The \\`deploy\\` configuration should be a hash (dictionary), or an array of hashes.")
super
end
def doc_path
'/user/deployment'
end
end
class DeployConditionError < DeployConfigError
def initialize(msg = "\\`deploy.on\\` should be a hash (dictionary).")
super
end
def doc_path
'/user/deployment#Conditional-Releases-with-on%3A'
end
end
class AptSourcesConfigError < CompilationError
def initialize(msg = "\\`apt\\` should be a hash with key \\`sources\\` and an array as a value.")
super
end
def doc_path
'/user/installing-dependencies'
end
end
class AptPackagesConfigError < CompilationError
def initialize(msg = "\\`apt\\` should be a hash with key \\`packages\\` and an array as a value.")
super
end
def doc_path
'/user/installing-dependencies'
end
end
class SnapsConfigError < CompilationError
def initialize(msg = "\\`snaps\\` should be a list.")
super
end
def doc_path
'/user/installing-dependencies'
end
end
class PkgConfigError < CompilationError
def initialize(msg = "\\`pkg\\` should be a list.")
super
end
def doc_path
'/user/installing-dependencies'
end
end
class GithubAppsTokenFetchError < CompilationError
def initialize(msg = "Unable to fetch GitHub Apps Token. GitHub may be unavailable. " \
"Check https://githubstatus.com. If GitHub is available, restart may resolve the " \
"temporary problem.")
super
end
end
end
end