@@ -178,21 +178,29 @@ internal static int ExceptionHandler(Exception exception, ParseResult parseResul
178
178
179
179
if ( exception is Utils . GracefulException )
180
180
{
181
- Reporter . Error . WriteLine ( CommandLoggingContext . IsVerbose
182
- ? exception . ToString ( ) . Red ( ) . Bold ( )
183
- : exception . Message . Red ( ) . Bold ( ) ) ;
181
+ Reporter . Error . WriteLine ( CommandLoggingContext . IsVerbose ?
182
+ exception . ToString ( ) . Red ( ) . Bold ( ) :
183
+ exception . Message . Red ( ) . Bold ( ) ) ;
184
184
}
185
185
else if ( exception is CommandParsingException )
186
186
{
187
- Reporter . Error . WriteLine ( CommandLoggingContext . IsVerbose
188
- ? exception . ToString ( ) . Red ( ) . Bold ( )
189
- : exception . Message . Red ( ) . Bold ( ) ) ;
187
+ Reporter . Error . WriteLine ( CommandLoggingContext . IsVerbose ?
188
+ exception . ToString ( ) . Red ( ) . Bold ( ) :
189
+ exception . Message . Red ( ) . Bold ( ) ) ;
190
190
parseResult . ShowHelp ( ) ;
191
191
}
192
+ else if ( exception . GetType ( ) . Name . Equals ( "WorkloadManifestCompositionException" ) )
193
+ {
194
+ Reporter . Error . WriteLine ( CommandLoggingContext . IsVerbose ?
195
+ exception . ToString ( ) . Red ( ) . Bold ( ) :
196
+ exception . Message . Red ( ) . Bold ( ) ) ;
197
+ }
192
198
else
193
199
{
194
200
Reporter . Error . Write ( "Unhandled exception: " . Red ( ) . Bold ( ) ) ;
195
- Reporter . Error . WriteLine ( exception . ToString ( ) . Red ( ) . Bold ( ) ) ;
201
+ Reporter . Error . WriteLine ( CommandLoggingContext . IsVerbose ?
202
+ exception . ToString ( ) . Red ( ) . Bold ( ) :
203
+ exception . Message . Red ( ) . Bold ( ) ) ;
196
204
}
197
205
198
206
return 1 ;
0 commit comments