Last change
on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
599 bytes
|
Line | |
---|
1 |
|
---|
2 | const maxRetry = 3
|
---|
3 |
|
---|
4 | class GitError extends Error {
|
---|
5 | shouldRetry () {
|
---|
6 | return false
|
---|
7 | }
|
---|
8 | }
|
---|
9 |
|
---|
10 | class GitConnectionError extends GitError {
|
---|
11 | constructor (message) {
|
---|
12 | super('A git connection error occurred')
|
---|
13 | }
|
---|
14 |
|
---|
15 | shouldRetry (number) {
|
---|
16 | return number < maxRetry
|
---|
17 | }
|
---|
18 | }
|
---|
19 |
|
---|
20 | class GitPathspecError extends GitError {
|
---|
21 | constructor (message) {
|
---|
22 | super('The git reference could not be found')
|
---|
23 | }
|
---|
24 | }
|
---|
25 |
|
---|
26 | class GitUnknownError extends GitError {
|
---|
27 | constructor (message) {
|
---|
28 | super('An unknown git error occurred')
|
---|
29 | }
|
---|
30 | }
|
---|
31 |
|
---|
32 | module.exports = {
|
---|
33 | GitConnectionError,
|
---|
34 | GitPathspecError,
|
---|
35 | GitUnknownError
|
---|
36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.