File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ static void GetGeneratorKind(string generator, List<string> errorMessages)
227227 return ;
228228 }
229229
230- errorMessages . Add ( $ "Unknown generator kind: { generator } . Defaulting to { options . Kind } ") ;
230+ errorMessages . Add ( $ "Unknown generator kind: { generator } .") ;
231231 }
232232
233233 static void GetDestinationPlatform ( string platform , List < string > errorMessages )
@@ -274,8 +274,6 @@ static void Main(string[] args)
274274 List < string > errorMessages = new List < string > ( ) ;
275275 bool helpShown = false ;
276276
277- try
278- {
279277 if ( ! ParseCommandLineArgs ( args , errorMessages , ref helpShown ) )
280278 {
281279 PrintErrorMessages ( errorMessages ) ;
@@ -287,19 +285,12 @@ static void Main(string[] args)
287285 Generator gen = new Generator ( options ) ;
288286
289287 bool validOptions = gen . ValidateOptions ( errorMessages ) ;
290-
291288 PrintErrorMessages ( errorMessages ) ;
292289
293- if ( validOptions )
294- gen . Run ( ) ;
295- }
296- catch ( Exception ex )
297- {
298- PrintErrorMessages ( errorMessages ) ;
299- Console . Error . WriteLine ( ) ;
290+ if ( errorMessages . Any ( ) || ! validOptions )
291+ Environment . Exit ( 1 ) ;
300292
301- throw ex ;
302- }
293+ gen . Run ( ) ;
303294 }
304295 }
305296}
You can’t perform that action at this time.
0 commit comments