Commit 0e4ecfa 1 parent 3658fec commit 0e4ecfa Copy full SHA for 0e4ecfa
File tree 11 files changed +84
-40
lines changed
templates/components/vectordbs/typescript
11 files changed +84
-40
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " create-llama " : patch
3
+ ---
4
+
5
+ fix: add trycatch for generating error
Original file line number Diff line number Diff line change @@ -37,8 +37,12 @@ async function loadAndIndex() {
37
37
}
38
38
39
39
( async ( ) => {
40
- checkRequiredEnvVars ( ) ;
41
- initSettings ( ) ;
42
- await loadAndIndex ( ) ;
43
- console . log ( "Finished generating storage." ) ;
40
+ try {
41
+ checkRequiredEnvVars ( ) ;
42
+ initSettings ( ) ;
43
+ await loadAndIndex ( ) ;
44
+ console . log ( "Finished generating storage." ) ;
45
+ } catch ( error ) {
46
+ console . error ( "Error generating storage." , error ) ;
47
+ }
44
48
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -30,8 +30,12 @@ async function loadAndIndex() {
30
30
}
31
31
32
32
( async ( ) => {
33
- checkRequiredEnvVars ( ) ;
34
- initSettings ( ) ;
35
- await loadAndIndex ( ) ;
36
- console . log ( "Finished generating storage." ) ;
33
+ try {
34
+ checkRequiredEnvVars ( ) ;
35
+ initSettings ( ) ;
36
+ await loadAndIndex ( ) ;
37
+ console . log ( "Finished generating storage." ) ;
38
+ } catch ( error ) {
39
+ console . error ( "Error generating storage." , error ) ;
40
+ }
37
41
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -57,8 +57,12 @@ async function loadAndIndex() {
57
57
}
58
58
59
59
( async ( ) => {
60
- checkRequiredEnvVars ( ) ;
61
- initSettings ( ) ;
62
- await loadAndIndex ( ) ;
63
- console . log ( "Finished generating storage." ) ;
60
+ try {
61
+ checkRequiredEnvVars ( ) ;
62
+ initSettings ( ) ;
63
+ await loadAndIndex ( ) ;
64
+ console . log ( "Finished generating storage." ) ;
65
+ } catch ( error ) {
66
+ console . error ( "Error generating storage." , error ) ;
67
+ }
64
68
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -29,8 +29,12 @@ async function loadAndIndex() {
29
29
}
30
30
31
31
( async ( ) => {
32
- checkRequiredEnvVars ( ) ;
33
- initSettings ( ) ;
34
- await loadAndIndex ( ) ;
35
- console . log ( "Finished generating storage." ) ;
32
+ try {
33
+ checkRequiredEnvVars ( ) ;
34
+ initSettings ( ) ;
35
+ await loadAndIndex ( ) ;
36
+ console . log ( "Finished generating storage." ) ;
37
+ } catch ( error ) {
38
+ console . error ( "Error generating storage." , error ) ;
39
+ }
36
40
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -45,8 +45,12 @@ async function loadAndIndex() {
45
45
}
46
46
47
47
( async ( ) => {
48
- checkRequiredEnvVars ( ) ;
49
- initSettings ( ) ;
50
- await loadAndIndex ( ) ;
51
- console . log ( "Finished generating storage." ) ;
48
+ try {
49
+ checkRequiredEnvVars ( ) ;
50
+ initSettings ( ) ;
51
+ await loadAndIndex ( ) ;
52
+ console . log ( "Finished generating storage." ) ;
53
+ } catch ( error ) {
54
+ console . error ( "Error generating storage." , error ) ;
55
+ }
52
56
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ async function generateDatasource() {
37
37
}
38
38
39
39
( async ( ) => {
40
- initSettings ( ) ;
41
- await generateDatasource ( ) ;
42
- console . log ( "Finished generating storage." ) ;
40
+ try {
41
+ initSettings ( ) ;
42
+ await generateDatasource ( ) ;
43
+ console . log ( "Finished generating storage." ) ;
44
+ } catch ( error ) {
45
+ console . error ( "Error generating storage." , error ) ;
46
+ }
43
47
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -35,9 +35,12 @@ async function loadAndIndex() {
35
35
}
36
36
37
37
( async ( ) => {
38
- checkRequiredEnvVars ( ) ;
39
- initSettings ( ) ;
40
- await loadAndIndex ( ) ;
41
- console . log ( "Finished generating storage." ) ;
42
- process . exit ( 0 ) ;
38
+ try {
39
+ checkRequiredEnvVars ( ) ;
40
+ initSettings ( ) ;
41
+ await loadAndIndex ( ) ;
42
+ console . log ( "Finished generating storage." ) ;
43
+ } catch ( error ) {
44
+ console . error ( "Error generating storage." , error ) ;
45
+ }
43
46
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -25,8 +25,12 @@ async function loadAndIndex() {
25
25
}
26
26
27
27
( async ( ) => {
28
- checkRequiredEnvVars ( ) ;
29
- initSettings ( ) ;
30
- await loadAndIndex ( ) ;
31
- console . log ( "Finished generating storage." ) ;
28
+ try {
29
+ checkRequiredEnvVars ( ) ;
30
+ initSettings ( ) ;
31
+ await loadAndIndex ( ) ;
32
+ console . log ( "Finished generating storage." ) ;
33
+ } catch ( error ) {
34
+ console . error ( "Error generating storage." , error ) ;
35
+ }
32
36
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -30,8 +30,12 @@ async function loadAndIndex() {
30
30
}
31
31
32
32
( async ( ) => {
33
- checkRequiredEnvVars ( ) ;
34
- initSettings ( ) ;
35
- await loadAndIndex ( ) ;
36
- console . log ( "Finished generating storage." ) ;
33
+ try {
34
+ checkRequiredEnvVars ( ) ;
35
+ initSettings ( ) ;
36
+ await loadAndIndex ( ) ;
37
+ console . log ( "Finished generating storage." ) ;
38
+ } catch ( error ) {
39
+ console . error ( "Error generating storage." , error ) ;
40
+ }
37
41
} ) ( ) ;
Original file line number Diff line number Diff line change @@ -23,8 +23,12 @@ async function loadAndIndex() {
23
23
}
24
24
25
25
( async ( ) => {
26
- checkRequiredEnvVars ( ) ;
27
- initSettings ( ) ;
28
- await loadAndIndex ( ) ;
29
- console . log ( "Finished generating storage." ) ;
26
+ try {
27
+ checkRequiredEnvVars ( ) ;
28
+ initSettings ( ) ;
29
+ await loadAndIndex ( ) ;
30
+ console . log ( "Finished generating storage." ) ;
31
+ } catch ( error ) {
32
+ console . error ( "Error generating storage." , error ) ;
33
+ }
30
34
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments