Parcourir la source

fix(nsis-gen): set warning values instead of throwing exceptions

evshiron il y a 8 ans
Parent
commit
f79ed55d1b
1 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 5 5
      src/lib/nsis-gen/NsisComposer.ts

+ 5 - 5
src/lib/nsis-gen/NsisComposer.ts

@@ -35,23 +35,23 @@ export class NsisComposer {
     constructor(protected options: INsisComposerOptions) {
 
         if(!this.options.appName) {
-            throw new Error('ERROR_NO_APPNAME');
+            this.options.appName = 'NO_APPNAME';
         }
 
         if(!this.options.companyName) {
-            throw new Error('ERROR_NO_COMPANYNAME');
+            this.options.companyName = 'NO_COMPANYNAME';
         }
 
         if(!this.options.description) {
-            throw new Error('ERROR_NO_DESCRIPTION');
+            this.options.description = 'NO_DESCRIPTION';
         }
 
         if(!this.options.version) {
-            throw new Error('ERROR_NO_VERSION');
+            this.options.version = 'NO_VERSION';
         }
 
         if(!this.options.copyright) {
-            throw new Error('ERROR_NO_COPYRIGHT');
+            this.options.copyright = 'ERROR_NO_COPYRIGHT';
         }
 
         this.options.compression = this.options.compression || 'lzma';