From f648a4b234ad33c3ab68888dcfb0d64f63915a47 Mon Sep 17 00:00:00 2001 From: Malte Rosenbjerg Date: Tue, 8 Dec 2020 23:30:10 +0100 Subject: [PATCH] Include ffprobe std output in exception --- FFMpegCore/FFProbe/FFProbe.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FFMpegCore/FFProbe/FFProbe.cs b/FFMpegCore/FFProbe/FFProbe.cs index 5c21b9b..076bbfd 100644 --- a/FFMpegCore/FFProbe/FFProbe.cs +++ b/FFMpegCore/FFProbe/FFProbe.cs @@ -46,7 +46,7 @@ public static IMediaAnalysis Analyse(Stream stream, int outputCapacity = int.Max } var exitCode = task.ConfigureAwait(false).GetAwaiter().GetResult(); if (exitCode != 0) - throw new FFMpegException(FFMpegExceptionType.Process, $"FFProbe process returned exit status {exitCode}: {string.Join("\n", instance.OutputData)} {string.Join("\n", instance.ErrorData)}"); + throw new FFMpegException(FFMpegExceptionType.Process, $"FFProbe process returned exit status {exitCode}", null, string.Join("\n", instance.ErrorData), string.Join("\n", instance.OutputData)); return ParseOutput(pipeArgument.PipePath, instance); } @@ -86,7 +86,7 @@ public static async Task AnalyseAsync(Stream stream, int outputC } var exitCode = await task; if (exitCode != 0) - throw new FFMpegException(FFMpegExceptionType.Process, $"FFProbe process returned exit status {exitCode}: {string.Join("\n", instance.OutputData)} {string.Join("\n", instance.ErrorData)}"); + throw new FFMpegException(FFMpegExceptionType.Process, $"FFProbe process returned exit status {exitCode}", null, string.Join("\n", instance.ErrorData), string.Join("\n", instance.OutputData)); pipeArgument.Post(); return ParseOutput(pipeArgument.PipePath, instance);