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)
227
227
return ;
228
228
}
229
229
230
- errorMessages . Add ( $ "Unknown generator kind: { generator } . Defaulting to { options . Kind } ") ;
230
+ errorMessages . Add ( $ "Unknown generator kind: { generator } .") ;
231
231
}
232
232
233
233
static void GetDestinationPlatform ( string platform , List < string > errorMessages )
@@ -274,8 +274,6 @@ static void Main(string[] args)
274
274
List < string > errorMessages = new List < string > ( ) ;
275
275
bool helpShown = false ;
276
276
277
- try
278
- {
279
277
if ( ! ParseCommandLineArgs ( args , errorMessages , ref helpShown ) )
280
278
{
281
279
PrintErrorMessages ( errorMessages ) ;
@@ -287,19 +285,12 @@ static void Main(string[] args)
287
285
Generator gen = new Generator ( options ) ;
288
286
289
287
bool validOptions = gen . ValidateOptions ( errorMessages ) ;
290
-
291
288
PrintErrorMessages ( errorMessages ) ;
292
289
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 ) ;
300
292
301
- throw ex ;
302
- }
293
+ gen . Run ( ) ;
303
294
}
304
295
}
305
296
}
You can’t perform that action at this time.
0 commit comments