• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025-2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package ohos;
17 
18 /**
19  * PackingToolErrMsg
20  *
21  * @since 2025/01/21
22  */
23 public class PackingToolErrMsg {
24 
25     // packing tool error
26     /**
27      * EXECUTE_PACKING_TOOL_FAILED
28      */
29     public static final ErrorMsg EXECUTE_PACKING_TOOL_FAILED = ErrorMsg.getPackingToolErrBuilder()
30             .setTypeCode("10")
31             .setErrCode("001")
32             .setDescription("Execute packing tool failed.")
33             .setCause("%s")
34             .addSolution("Please check the first error message for more details and modify accordingly.")
35             .build();
36 
37     /**
38      * COMMAND_PARSER_FAILED
39      */
40     public static final ErrorMsg COMMAND_PARSER_FAILED = ErrorMsg.getPackingToolErrBuilder()
41             .setTypeCode("10")
42             .setErrCode("002")
43             .setDescription("Command parser failed.")
44             .setCause("%s")
45             .build();
46 
47     /**
48      * COMMAND_VERIFY_FAILED
49      */
50     public static final ErrorMsg COMMAND_VERIFY_FAILED = ErrorMsg.getPackingToolErrBuilder()
51             .setTypeCode("10")
52             .setErrCode("003")
53             .setDescription("Command verify failed.")
54             .setCause("%s")
55             .build();
56 
57     // compress verify error
58     /**
59      * HAP_MODE_ARGS_INVALID
60      */
61     public static final ErrorMsg HAP_MODE_ARGS_INVALID = ErrorMsg.getPackingToolErrBuilder()
62             .setTypeCode("11")
63             .setErrCode("001")
64             .setDescription("Parse and check args invalid in hap mode.")
65             .setCause("%s")
66             .build();
67 
68     /**
69      * HSP_MODE_ARGS_INVALID
70      */
71     public static final ErrorMsg HSP_MODE_ARGS_INVALID = ErrorMsg.getPackingToolErrBuilder()
72             .setTypeCode("11")
73             .setErrCode("002")
74             .setDescription("Parse and check args invalid in hsp mode.")
75             .setCause("%s")
76             .build();
77 
78     /**
79      * APP_MODE_ARGS_INVALID
80      */
81     public static final ErrorMsg APP_MODE_ARGS_INVALID = ErrorMsg.getPackingToolErrBuilder()
82             .setTypeCode("11")
83             .setErrCode("003")
84             .setDescription("Parse and check args invalid in app mode.")
85             .setCause("%s")
86             .build();
87 
88     /**
89      * COMMAND_MODE_INVALID
90      */
91     public static final ErrorMsg COMMAND_MODE_INVALID = ErrorMsg.getPackingToolErrBuilder()
92             .setTypeCode("11")
93             .setErrCode("011")
94             .setDescription("Command verify mode is invalid.")
95             .setCause("Input mode is invalid.")
96             .build();
97 
98     /**
99      * BUNDLE_TYPE_SHARED_INVALID
100      */
101     public static final ErrorMsg BUNDLE_TYPE_SHARED_INVALID = ErrorMsg.getPackingToolErrBuilder()
102             .setTypeCode("11")
103             .setErrCode("012")
104             .setDescription("Check bundleType is shared failed.")
105             .setCause("%s")
106             .build();
107 
108     /**
109      * BUNDLE_TYPE_APPSERVICE_INVALID
110      */
111     public static final ErrorMsg BUNDLE_TYPE_APPSERVICE_INVALID = ErrorMsg.getPackingToolErrBuilder()
112             .setTypeCode("11")
113             .setErrCode("013")
114             .setDescription("Check the bundleType is appService failed.")
115             .setCause("%s")
116             .build();
117 
118     /**
119      * HSP_HAS_ABILITIES_FAILED
120      */
121     public static final ErrorMsg HSP_HAS_ABILITIES_FAILED = ErrorMsg.getPackingToolErrBuilder()
122             .setTypeCode("11")
123             .setErrCode("014")
124             .setDescription("Check hsp has abilities failed.")
125             .setCause("%s")
126             .build();
127 
128     /**
129      * HSP_HAS_EXTENSION_ABILITIES_FAILED
130      */
131     public static final ErrorMsg HSP_HAS_EXTENSION_ABILITIES_FAILED = ErrorMsg.getPackingToolErrBuilder()
132             .setTypeCode("11")
133             .setErrCode("015")
134             .setDescription("Check hsp has extension abilities failed.")
135             .setCause("%s")
136             .build();
137 
138     /**
139      * HAS_HOME_ABILITY_INVALID
140      */
141     public static final ErrorMsg HAS_HOME_ABILITY_INVALID = ErrorMsg.getPackingToolErrBuilder()
142             .setTypeCode("11")
143             .setErrCode("016")
144             .setDescription("Check hsp has entry abilitiy failed.")
145             .setCause("%s")
146             .build();
147 
148     /**
149      * HAS_HOME_EXTENSION_ABILITY_INVALID
150      */
151     public static final ErrorMsg HAS_HOME_EXTENSION_ABILITY_INVALID = ErrorMsg.getPackingToolErrBuilder()
152             .setTypeCode("11")
153             .setErrCode("017")
154             .setDescription("Check hsp has entry extensionAbility failed.")
155             .setCause("%s")
156             .build();
157 
158     /**
159      * OUT_PATH_INVALID
160      */
161     public static final ErrorMsg OUT_PATH_INVALID = ErrorMsg.getPackingToolErrBuilder()
162             .setTypeCode("11")
163             .setErrCode("018")
164             .setDescription("Invalid output path.")
165             .setCause("%s")
166             .build();
167 
168     // compress process error
169     /**
170      * COMPRESS_PROCESS_FAILED
171      */
172     public static final ErrorMsg COMPRESS_PROCESS_FAILED = ErrorMsg.getPackingToolErrBuilder()
173             .setTypeCode("12")
174             .setErrCode("001")
175             .setDescription("Execute compress process failed.")
176             .setCause("%s")
177             .addSolution("%s")
178             .build();
179 
180     /**
181      * COMPRESS_HAP_FAILED
182      */
183     public static final ErrorMsg COMPRESS_HAP_FAILED = ErrorMsg.getPackingToolErrBuilder()
184             .setTypeCode("12")
185             .setErrCode("002")
186             .setDescription("Compress Stage hap failed.")
187             .setCause("%s")
188             .addSolution("Please check the first error message for more details and modify accordingly.")
189             .build();
190 
191     /**
192      * CHECK_STAGE_HAP_FAILED
193      */
194     public static final ErrorMsg CHECK_STAGE_HAP_FAILED = ErrorMsg.getPackingToolErrBuilder()
195             .setTypeCode("12")
196             .setErrCode("003")
197             .setDescription("Verify Stage hap info failed.")
198             .setCause("%s")
199             .addSolution("Please check the first error message for more details and modify accordingly.")
200             .build();
201 
202     /**
203      * CHECK_AS_TSAN_ENABLED
204      */
205     public static final ErrorMsg CHECK_AS_TSAN_ENABLED = ErrorMsg.getPackingToolErrBuilder()
206             .setTypeCode("12")
207             .setErrCode("004")
208             .setDescription("Check asanEnabled failed.")
209             .setCause("%s")
210             .addSolution("Please ensure the parameters are correctly set. " +
211                         "Review 'app.json' and adjust the configuration as needed.")
212             .build();
213 
214     /**
215      * CHECK_HWASAN_ENABLED_INVALID
216      */
217     public static final ErrorMsg CHECK_HWASAN_ENABLED_INVALID = ErrorMsg.getPackingToolErrBuilder()
218             .setTypeCode("12")
219             .setErrCode("005")
220             .setDescription("Check hwasanEnabled failed.")
221             .setCause("%s")
222             .addSolution("Please ensure the parameters are correctly set. " +
223                         "Review 'app.json' and adjust the configuration as needed.")
224             .build();
225 
226     /**
227      * CHECK_ATOMIC_SERVICE_FAILED
228      */
229     public static final ErrorMsg CHECK_ATOMIC_SERVICE_FAILED = ErrorMsg.getPackingToolErrBuilder()
230             .setTypeCode("12")
231             .setErrCode("006")
232             .setDescription("Check atomicService failed.")
233             .setCause("%s")
234             .addSolution("Please check the first error message for more details and modify accordingly.")
235             .build();
236 
237     /**
238      * CHECK_CONTINUE_BUNDLENAME_INVALID
239      */
240     public static final ErrorMsg CHECK_CONTINUE_BUNDLENAME_INVALID = ErrorMsg.getPackingToolErrBuilder()
241             .setTypeCode("12")
242             .setErrCode("007")
243             .setDescription("Check continueBundleName invalid.")
244             .setCause("%s")
245             .addSolution("Ensure continueBundleName not inclue self.")
246             .build();
247 
248     /**
249      * CHECK_OVERLAY_CFG_FAILED
250      */
251     public static final ErrorMsg CHECK_OVERLAY_CFG_FAILED = ErrorMsg.getPackingToolErrBuilder()
252             .setTypeCode("12")
253             .setErrCode("008")
254             .setDescription("Check whether is an overlay hsp failed.")
255             .setCause("%s")
256             .addSolution("Please check 'app.json5' and 'module.json5' file according to the error.")
257             .addSolution("Check targetBundleName, targetModuleName, and targetPriority in the related module.")
258             .addSolution("Note: Modules configured with the targetModuleName is overlay feature module.")
259             .addSolution("Note: Modules configured with the targetBundleName is overlay feature application.")
260             .build();
261 
262     /**
263      * COMPRESS_PROCESS_EXCEPTION
264      */
265     public static final ErrorMsg COMPRESS_PROCESS_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
266             .setTypeCode("12")
267             .setErrCode("009")
268             .setDescription("Process compress exception.")
269             .setCause("%s")
270             .addSolution("Please check the first error message for more details and modify accordingly.")
271             .build();
272 
273     /**
274      * HAS_GENERATE_BUILD_HASH
275      */
276     public static final ErrorMsg HAS_GENERATE_BUILD_HASH = ErrorMsg.getPackingToolErrBuilder()
277             .setTypeCode("12")
278             .setErrCode("010")
279             .setDescription("Verify has generate build hash failed.")
280             .setCause("%s")
281             .build();
282 
283     /**
284      * SET_GENERATE_BUILD_HASH
285      */
286     public static final ErrorMsg SET_GENERATE_BUILD_HASH = ErrorMsg.getPackingToolErrBuilder()
287             .setTypeCode("12")
288             .setErrCode("011")
289             .setDescription("Set generate build hash failed.")
290             .setCause("%s")
291             .build();
292 
293     /**
294      * CHECK_UBASAN_ENABLED_INVALID
295      */
296     public static final ErrorMsg CHECK_UBASAN_ENABLED_INVALID = ErrorMsg.getPackingToolErrBuilder()
297             .setTypeCode("12")
298             .setErrCode("012")
299             .setDescription("Check ubsanEnabled failed.")
300             .setCause("%s")
301             .addSolution("Please ensure the parameters are correctly set. " +
302                         "Review 'app.json' and adjust the configuration as needed.")
303             .build();
304 
305     /**
306      * READ_STAGE_HAP_VERIFY_INFO_FAILED
307      */
308     public static final ErrorMsg READ_STAGE_HAP_VERIFY_INFO_FAILED = ErrorMsg.getPackingToolErrBuilder()
309             .setTypeCode("12")
310             .setErrCode("013")
311             .setDescription("Read Stage hap verify info exist exception.")
312             .setCause("%s")
313             .addSolution("Please check the exception message for more details and modify accordingly.")
314             .build();
315 
316     /**
317      * COMPRESS_PARALLEL_EXCEPTION
318      */
319     public static final ErrorMsg COMPRESS_PARALLEL_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
320             .setTypeCode("12")
321             .setErrCode("014")
322             .setDescription("Parallel compress exception.")
323             .setCause("%s")
324             .addSolution("Please check the related exception message and modify the operation.")
325             .build();
326 
327     /**
328      * COMPRESS_APP_FAILED
329      */
330     public static final ErrorMsg COMPRESS_APP_FAILED = ErrorMsg.getPackingToolErrBuilder()
331             .setTypeCode("12")
332             .setErrCode("015")
333             .setDescription("Compress app file failed.")
334             .setCause("%s")
335             .addSolution("Please check the first error message for more details and modify accordingly.")
336             .build();
337 
338     /**
339      * INVALID_HAP_FILE
340      */
341     public static final ErrorMsg INVALID_HAP_FILE = ErrorMsg.getPackingToolErrBuilder()
342             .setTypeCode("12")
343             .setErrCode("016")
344             .setDescription("Check input hap or hsp file is invalid.")
345             .setCause("%s")
346             .build();
347 
348     /**
349      * CHECK_SHARED_APP_INVALID
350      */
351     public static final ErrorMsg CHECK_SHARED_APP_INVALID = ErrorMsg.getPackingToolErrBuilder()
352             .setTypeCode("12")
353             .setErrCode("017")
354             .setDescription("Check shared App invalid.")
355             .setCause("%s")
356             .addSolution("%s")
357             .build();
358 
359     /**
360      * CHECK_BUNDLETYPE_INVALID
361      */
362     public static final ErrorMsg CHECK_BUNDLETYPE_INVALID = ErrorMsg.getPackingToolErrBuilder()
363             .setTypeCode("12")
364             .setErrCode("018")
365             .setDescription("Check bundleType is invalid.")
366             .setCause("%s")
367             .addSolution("%s")
368             .build();
369 
370     /**
371      * APP_ATOMICSERVICE_COMPRESSED_SIZE_INVALID
372      */
373     public static final ErrorMsg APP_ATOMICSERVICE_COMPRESSED_SIZE_INVALID = ErrorMsg.getPackingToolErrBuilder()
374             .setTypeCode("12")
375             .setErrCode("019")
376             .setDescription("Check app atomicservice compress size failed.")
377             .setCause("%s")
378             .build();
379 
380     /**
381      * READ_FA_HAP_VERIFY_INFO_FAILED
382      */
383     public static final ErrorMsg READ_FA_HAP_VERIFY_INFO_FAILED = ErrorMsg.getPackingToolErrBuilder()
384             .setTypeCode("12")
385             .setErrCode("020")
386             .setDescription("Read FA hap verify info exist exception.")
387             .setCause("%s")
388             .addSolution("Please check the first error message for more details and modify accordingly.")
389             .build();
390 
391     /**
392      * COMPRESS_APP_IO_EXCEPTION
393      */
394     public static final ErrorMsg COMPRESS_APP_IO_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
395             .setTypeCode("12")
396             .setErrCode("021")
397             .setDescription("IO exception when compress app.")
398             .setCause("%s")
399             .addSolution("Please check the related exception message and modify the operation.")
400             .build();
401 
402     /**
403      * COMPRESS_HSP_FAILED
404      */
405     public static final ErrorMsg COMPRESS_HSP_FAILED = ErrorMsg.getPackingToolErrBuilder()
406             .setTypeCode("12")
407             .setErrCode("022")
408             .setDescription("Compress Hsp failed.")
409             .setCause("%s")
410             .addSolution("Please check the first error message for more details and modify accordingly.")
411             .build();
412 
413     /**
414      * JSON_SPECIAL_PROCESS_FAILED
415      */
416     public static final ErrorMsg JSON_SPECIAL_PROCESS_FAILED = ErrorMsg.getPackingToolErrBuilder()
417             .setTypeCode("12")
418             .setErrCode("023")
419             .setDescription("Json special process exist exception.")
420             .setCause("%s")
421             .addSolution("Please check the exception message and modify.")
422             .build();
423 
424     /**
425      * CHECK_ATOMIC_SERVICE_SIZE_FAILED
426      */
427     public static final ErrorMsg CHECK_ATOMIC_SERVICE_SIZE_FAILED = ErrorMsg.getPackingToolErrBuilder()
428             .setTypeCode("12")
429             .setErrCode("024")
430             .setDescription("Check atomicService size failed.")
431             .setCause("%s")
432             .addSolution("Please check the related size check error message and reduce related module size.")
433             .build();
434 
435     // module json check error
436     /**
437      * PARSE_JSON_OBJECT_EXCEPTION
438      */
439     public static final ErrorMsg PARSE_JSON_OBJECT_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
440             .setTypeCode("13")
441             .setErrCode("001")
442             .setDescription("Parse json object exception.")
443             .setCause("%s")
444             .build();
445 
446     /**
447      * PARSE_JSON_FAILED
448      */
449     public static final ErrorMsg PARSE_JSON_FAILED = ErrorMsg.getPackingToolErrBuilder()
450             .setTypeCode("13")
451             .setErrCode("002")
452             .setDescription("Parse json profile failed.")
453             .setCause("%s")
454             .build();
455 
456     /**
457      * CHECK_MODULE_ATOMIC_SERVICE_FAILED
458      */
459     public static final ErrorMsg CHECK_MODULE_ATOMIC_SERVICE_FAILED = ErrorMsg.getPackingToolErrBuilder()
460             .setTypeCode("13")
461             .setErrCode("003")
462             .setDescription("Check module atomicService invalid.")
463             .setCause("%s")
464             .build();
465 
466     /**
467      * PARSE_STAGE_JSON_FAILED
468      */
469     public static final ErrorMsg PARSE_STAGE_JSON_FAILED = ErrorMsg.getPackingToolErrBuilder()
470             .setTypeCode("13")
471             .setErrCode("004")
472             .setDescription("Failed to parse module.json for the Stage module.")
473             .setCause("%s")
474             .build();
475 
476     /**
477      * PARSE_STAGE_BUNDLE_TYPE_FAILED
478      */
479     public static final ErrorMsg PARSE_STAGE_BUNDLE_TYPE_FAILED = ErrorMsg.getPackingToolErrBuilder()
480             .setTypeCode("13")
481             .setErrCode("005")
482             .setDescription("Failed to parse module.json and bundleType.")
483             .setCause("%s")
484             .addSolution("%s")
485             .build();
486 
487     /**
488      * CHECK_LEASTONE_ABILITY
489      */
490     public static final ErrorMsg CHECK_LEASTONE_ABILITY = ErrorMsg.getPackingToolErrBuilder()
491             .setTypeCode("13")
492             .setErrCode("006")
493             .setDescription("Check entry module at least one ability failed.")
494             .setCause("%s")
495             .addSolution("Ensure the entry type module contains at least one ability.")
496             .build();
497 
498     /**
499      * CHECK_ATOMIC_SERVICE_INSTALLATION_FREE_FAILED
500      */
501     public static final ErrorMsg CHECK_ATOMIC_SERVICE_INSTALLATION_FREE_FAILED = ErrorMsg.getPackingToolErrBuilder()
502             .setTypeCode("13")
503             .setErrCode("007")
504             .setDescription("Check module atomicService and installationFree invalid.")
505             .setCause("%s")
506             .addSolution("%s")
507             .build();
508 
509     /**
510      * PARSE_BUNDLE_NAME_FAILED
511      */
512     public static final ErrorMsg PARSE_BUNDLE_NAME_FAILED = ErrorMsg.getPackingToolErrBuilder()
513             .setTypeCode("13")
514             .setErrCode("008")
515             .setDescription("Get the bundleName from json file failed.")
516             .setCause("%s")
517             .build();
518 
519     /**
520      * PARSE_PROXY_DATA_URI_FAILED
521      */
522     public static final ErrorMsg PARSE_PROXY_DATA_URI_FAILED = ErrorMsg.getPackingToolErrBuilder()
523             .setTypeCode("13")
524             .setErrCode("009")
525             .setDescription("Failed to parse module.json and proxyData object.")
526             .setCause("%s")
527             .addSolution("%s")
528             .build();
529 
530     /**
531      * CHECK_BUNDLETYPE_CONSISTENCY_FAILED
532      */
533     public static final ErrorMsg CHECK_BUNDLETYPE_CONSISTENCY_FAILED = ErrorMsg.getPackingToolErrBuilder()
534             .setTypeCode("13")
535             .setErrCode("010")
536             .setDescription("Failed to check the consistency of bundleType.")
537             .setCause("%s")
538             .addSolution("Make sure the bundleType is consistency for different modules.")
539             .build();
540 
541     /**
542      * PARSE_PATCH_MODULE_NAME_FAILED
543      */
544     public static final ErrorMsg PARSE_PATCH_MODULE_NAME_FAILED = ErrorMsg.getPackingToolErrBuilder()
545             .setTypeCode("13")
546             .setErrCode("011")
547             .setDescription("Failed to parse patch module name from patch.json.")
548             .setCause("%s")
549             .build();
550 
551     /**
552      * PARSE_FA_HAP_VERIFY_INFO_FAILED
553      */
554     public static final ErrorMsg PARSE_FA_HAP_VERIFY_INFO_FAILED = ErrorMsg.getPackingToolErrBuilder()
555             .setTypeCode("13")
556             .setErrCode("012")
557             .setDescription("Failed to parse FA hap verify info from config.json.")
558             .setCause("%s")
559             .build();
560 
561     /**
562      * PARSE_FA_JSON_FAILED
563      */
564     public static final ErrorMsg PARSE_FA_JSON_FAILED = ErrorMsg.getPackingToolErrBuilder()
565             .setTypeCode("13")
566             .setErrCode("013")
567             .setDescription("Failed to parse config.json for the FA module.")
568             .setCause("%s")
569             .build();
570 
571     // file operator error
572     /**
573      * FILE_NOT_FOUND
574      */
575     public static final ErrorMsg FILE_NOT_FOUND = ErrorMsg.getPackingToolErrBuilder()
576             .setTypeCode("14")
577             .setErrCode("001")
578             .setDescription("File avaiable not found exception.")
579             .setCause("%s")
580             .addSolution("Please check the related FileNotFoundException message.")
581             .addSolution("If the file is in use, close any applications or processes that might be using it.")
582             .build();
583 
584     /**
585      * CLOSE_ZIP_OUTPUT_STREAM_EXCEPTION
586      */
587     public static final ErrorMsg CLOSE_ZIP_OUTPUT_STREAM_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
588             .setTypeCode("14")
589             .setErrCode("002")
590             .setDescription("Close zip output stream exception.")
591             .setCause("%s")
592             .addSolution("Please check the related exception message and modify the operation.")
593             .build();
594 
595     /**
596      * CLOSE_STREAM_EXCEPTION
597      */
598     public static final ErrorMsg CLOSE_STREAM_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
599             .setTypeCode("14")
600             .setErrCode("003")
601             .setDescription("IO exception when closing stream.")
602             .addSolution("Please check the related exception message for more details and modify accordingly.")
603             .build();
604 
605     /**
606      * GET_FILE_CONTENT_FAILED
607      */
608     public static final ErrorMsg GET_FILE_CONTENT_FAILED = ErrorMsg.getPackingToolErrBuilder()
609             .setTypeCode("14")
610             .setErrCode("004")
611             .setDescription("Get file content failed.")
612             .setCause("%s")
613             .addSolution("Please check the related exception message for more details and modify accordingly.")
614             .build();
615 
616     /**
617      * FILE_NOT_EXIST
618      */
619     public static final ErrorMsg FILE_NOT_EXIST = ErrorMsg.getPackingToolErrBuilder()
620             .setTypeCode("14")
621             .setErrCode("005")
622             .setDescription("Parse file not exist.")
623             .setCause("%s")
624             .build();
625 
626     /**
627      * GET_FILE_SIZE_FAILED
628      */
629     public static final ErrorMsg GET_FILE_SIZE_FAILED = ErrorMsg.getPackingToolErrBuilder()
630             .setTypeCode("14")
631             .setErrCode("006")
632             .setDescription("Get file size failed.")
633             .setCause("%s")
634             .build();
635 
636     /**
637      * FILE_IO_EXCEPTION
638      */
639     public static final ErrorMsg FILE_IO_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
640             .setTypeCode("14")
641             .setErrCode("007")
642             .setDescription("File IO exception.")
643             .setCause("%s")
644             .addSolution("1. Ensure the file path is correct and the file exists.")
645             .addSolution("2. Verify you have the necessary permissions to access the file.")
646             .addSolution("3. Check for possible disk or file system errors.")
647             .addSolution("4. Review the related IOException message for further insights.")
648             .build();
649 
650     /**
651      * COMPRESS_FILE_EXCEPTION
652      */
653     public static final ErrorMsg COMPRESS_FILE_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
654             .setTypeCode("14")
655             .setErrCode("008")
656             .setDescription("Compress file exception.")
657             .setCause("%s")
658             .addSolution("Please check the related exception message and modify.")
659             .build();
660 
661     /**
662      * FILE_DELETE_FAILED
663      */
664     public static final ErrorMsg FILE_DELETE_FAILED = ErrorMsg.getPackingToolErrBuilder()
665             .setTypeCode("14")
666             .setErrCode("009")
667             .setDescription("File delete failed.")
668             .setCause("%s")
669             .addSolution("%s")
670             .addSolution("Verify you have the necessary permissions to delete the file.")
671             .build();
672 
673     // io exception
674     /**
675      * IO_EXCEPTION
676      */
677     public static final ErrorMsg IO_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
678             .setTypeCode("15")
679             .setErrCode("001")
680             .setDescription("IO exception.")
681             .setCause("%s")
682             .addSolution("1. Ensure the file path is correct and the file exists.")
683             .addSolution("2. Verify you have the necessary permissions to access the file.")
684             .addSolution("3. Check for possible disk or file system errors.")
685             .addSolution("4. Review the related error message for further insights.")
686             .build();
687 
688     /*
689      * NULL_POINTER_EXCEPTION
690      */
691     public static final ErrorMsg NULL_POINTER_EXCEPTION = ErrorMsg.getPackingToolErrBuilder()
692             .setTypeCode("15")
693             .setErrCode("002")
694             .setDescription("Null pointer exception.")
695             .setCause("%s")
696             .addSolution("Please review the related exception message for further insights.")
697             .build();
698 
699     // hap verify error
700     /**
701      * CHECK_APP_FIELDS_INVALID
702      */
703     public static final ErrorMsg CHECK_APP_FIELDS_INVALID = ErrorMsg.getPackingToolErrBuilder()
704             .setTypeCode("16")
705             .setErrCode("001")
706             .setDescription("App fields is invalid.")
707             .setCause("%s")
708             .addSolution("%s")
709             .build();
710 
711     /**
712      * APP_FIELDS_DIFFERENT_ERROR
713      */
714     public static final ErrorMsg APP_FIELDS_DIFFERENT_ERROR = ErrorMsg.getPackingToolErrBuilder()
715             .setTypeCode("16")
716             .setErrCode("002")
717             .setDescription("Some app variable is different.")
718             .setCause("%s")
719             .addSolution("%s")
720             .build();
721 
722     /**
723      * CHECK_POLICY_DISJOINT_ERROR
724      */
725     public static final ErrorMsg CHECK_POLICY_DISJOINT_ERROR = ErrorMsg.getPackingToolErrBuilder()
726             .setTypeCode("16")
727             .setErrCode("003")
728             .setDescription("Check two distroFilter policy disjoint invalid.")
729             .setCause("%s")
730             .addSolution("%s")
731             .build();
732 
733     /**
734      * CHECK_MODULE_NAME_INVALID
735      */
736     public static final ErrorMsg CHECK_MODULE_NAME_INVALID = ErrorMsg.getPackingToolErrBuilder()
737             .setTypeCode("16")
738             .setErrCode("004")
739             .setDescription("Check module name is invalid.")
740             .setCause("%s")
741             .addSolution("%s")
742             .build();
743 
744     /**
745      * CHECK_PACKAGE_NAME_INVALID
746      */
747     public static final ErrorMsg CHECK_PACKAGE_NAME_INVALID = ErrorMsg.getPackingToolErrBuilder()
748             .setTypeCode("16")
749             .setErrCode("005")
750             .setDescription("Check packageName invalid.")
751             .setCause("%s")
752             .addSolution("%s")
753             .build();
754 
755     /**
756      * CHECK_HAP_INVALID
757      */
758     public static final ErrorMsg CHECK_HAP_INVALID = ErrorMsg.getPackingToolErrBuilder()
759             .setTypeCode("16")
760             .setErrCode("006")
761             .setDescription("Check hap info is invalid.")
762             .setCause("%s")
763             .addSolution("Please check the first error message for more details and modify accordingly.")
764             .build();
765 
766     /**
767      * CHECK_ENTRY_INVALID
768      */
769     public static final ErrorMsg CHECK_ENTRY_INVALID = ErrorMsg.getPackingToolErrBuilder()
770             .setTypeCode("16")
771             .setErrCode("007")
772             .setDescription("Check entry module is invalid.")
773             .setCause("%s")
774             .addSolution("%s")
775             .build();
776 
777     /**
778      * CHECK_DEPENDENCY_INVALID
779      */
780     public static final ErrorMsg CHECK_DEPENDENCY_INVALID = ErrorMsg.getPackingToolErrBuilder()
781             .setTypeCode("16")
782             .setErrCode("008")
783             .setDescription("Check dependency is invalid.")
784             .setCause("%s")
785             .addSolution("%s")
786             .build();
787 
788     /**
789      * DEPENDENCY_LIST_INVALID
790      */
791     public static final ErrorMsg DEPENDENCY_LIST_INVALID = ErrorMsg.getPackingToolErrBuilder()
792             .setTypeCode("16")
793             .setErrCode("009")
794             .setDescription("Check dependency list is invalid.")
795             .setCause("%s")
796             .addSolution("%s")
797             .build();
798 
799     /**
800      * CHECK_ATOMICSERVICE_INVALID
801      */
802     public static final ErrorMsg CHECK_ATOMICSERVICE_INVALID = ErrorMsg.getPackingToolErrBuilder()
803             .setTypeCode("16")
804             .setErrCode("010")
805             .setDescription("Check atomicservice is invalid.")
806             .setCause("%s")
807             .addSolution("Please check the first error message for more details and modify accordingly.")
808             .build();
809 
810     /**
811      * ATOMICSERVICE_PRELOADS_INVALID
812      */
813     public static final ErrorMsg ATOMICSERVICE_PRELOADS_INVALID = ErrorMsg.getPackingToolErrBuilder()
814             .setTypeCode("16")
815             .setErrCode("011")
816             .setDescription("Atomicservice preloads is invalid.")
817             .setCause("%s")
818             .addSolution("Please check related preload message and modify preloads settings.")
819             .build();
820 
821     /**
822      * TARGET_MODULE_NAME_NOT_EXIST
823      */
824     public static final ErrorMsg TARGET_MODULE_NAME_NOT_EXIST = ErrorMsg.getPackingToolErrBuilder()
825             .setTypeCode("16")
826             .setErrCode("012")
827             .setDescription("Target moduleName is not exist.")
828             .setCause("%s")
829             .addSolution("Make sure pack with vaild and existing target module.")
830             .addSolution("Create missing modules or check target moduleName whether valid.")
831             .build();
832 
833     /**
834      * COMPILE_SDK_TYPE_DIFFERENT
835      */
836     public static final ErrorMsg COMPILE_SDK_TYPE_DIFFERENT = ErrorMsg.getPackingToolErrBuilder()
837             .setTypeCode("16")
838             .setErrCode("013")
839             .setDescription("CompileSdkType is different.")
840             .setCause("%s")
841             .addSolution("%s")
842             .build();
843 
844     /**
845      * PROXY_DATA_URI_NOT_UNIQUE
846      */
847     public static final ErrorMsg PROXY_DATA_URI_NOT_UNIQUE = ErrorMsg.getPackingToolErrBuilder()
848             .setTypeCode("16")
849             .setErrCode("014")
850             .setDescription("The values of uri in proxyData of module.json are not unique.")
851             .setCause("%s")
852             .addSolution("%s")
853             .build();
854 
855     /**
856      * CONTINUE_TYPE_INVALID
857      */
858     public static final ErrorMsg CONTINUE_TYPE_INVALID = ErrorMsg.getPackingToolErrBuilder()
859             .setTypeCode("16")
860             .setErrCode("015")
861             .setDescription("Check continueType is invalid.")
862             .setCause("%s")
863             .addSolution("%s")
864             .build();
865 
866     /**
867      * CHECK_FILE_SIZE_INVALID
868      */
869     public static final ErrorMsg CHECK_FILE_SIZE_INVALID = ErrorMsg.getPackingToolErrBuilder()
870             .setTypeCode("16")
871             .setErrCode("016")
872             .setDescription("Check file size failed.")
873             .setCause("%s")
874             .addSolution("Please check and reduced related module size.")
875             .build();
876 
877     /**
878      * CHECK_HAP_VERIFY_INFO_LIST_EMPTY
879      */
880     public static final ErrorMsg CHECK_HAP_VERIFY_INFO_LIST_EMPTY = ErrorMsg.getPackingToolErrBuilder()
881             .setTypeCode("16")
882             .setErrCode("017")
883             .setDescription("The provided list of HapVerifyInfos is empty.")
884             .setCause("%s")
885             .build();
886 
887     /**
888      * CHECK_ATOMIC_SERVICE_MODULE_SIZE
889      */
890     public static final ErrorMsg CHECK_ATOMIC_SERVICE_MODULE_SIZE = ErrorMsg.getPackingToolErrBuilder()
891             .setTypeCode("16")
892             .setErrCode("018")
893             .setDescription("Check the atomicService module size failed.")
894             .setCause("%s")
895             .addSolution("Please check and reduced related module size.")
896             .build();
897 
898     /**
899      * CHECK_FEATURE_DISTRO_FILTER_INVALID
900      */
901     public static final ErrorMsg CHECK_FEATURE_DISTRO_FILTER_INVALID = ErrorMsg.getPackingToolErrBuilder()
902             .setTypeCode("16")
903             .setErrCode("019")
904             .setDescription("Check the entry module distributionFilter is invalid.")
905             .setCause("%s")
906             .addSolution("Ensure the Entry type module distributionFilter file policy " +
907                         "settings is 'exclude' or 'include'.")
908             .build();
909 }
910