source: trip-planner-front/node_modules/@npmcli/git/lib/errors.js@ 188ee53

Last change on this file since 188ee53 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 599 bytes
Line 
1
2const maxRetry = 3
3
4class GitError extends Error {
5 shouldRetry () {
6 return false
7 }
8}
9
10class 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
20class GitPathspecError extends GitError {
21 constructor (message) {
22 super('The git reference could not be found')
23 }
24}
25
26class GitUnknownError extends GitError {
27 constructor (message) {
28 super('An unknown git error occurred')
29 }
30}
31
32module.exports = {
33 GitConnectionError,
34 GitPathspecError,
35 GitUnknownError
36}
Note: See TracBrowser for help on using the repository browser.