File tree Expand file tree Collapse file tree
MediaConverters.Lib/Imaging/Optimizations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,6 +88,8 @@ private static ImageFileOptimizationResult ConvertInLinux(ImageFileOptimizationC
8888 // 继续执行 libwmf 的转换,此时不支持 emf 格式
8989 if ( string . Equals ( file . Extension , ".emf" ) )
9090 {
91+ context . LogMessage ( $ "Convert emf to png is not supported with libwmf. File='{ file } '") ;
92+
9193 return new ImageFileOptimizationResult ( )
9294 {
9395 OptimizedImageFile = null ,
Original file line number Diff line number Diff line change @@ -84,7 +84,13 @@ internal static async Task<ErrorCode> RunAsync(Options options)
8484
8585 if ( ! imageFileOptimizationResult . IsSuccess )
8686 {
87- Console . Error . WriteLine ( imageFileOptimizationResult ) ;
87+ var errorMessage = $ "Failed to convert image file '{ inputFile . FullName } '. Reason: { imageFileOptimizationResult . FailureReason } ";
88+ if ( imageFileOptimizationResult . Exception is { } exception )
89+ {
90+ errorMessage += $ " Exception: { exception } ";
91+ }
92+
93+ Console . Error . WriteLine ( errorMessage ) ;
8894
8995 switch ( imageFileOptimizationResult . FailureReason )
9096 {
You can’t perform that action at this time.
0 commit comments