This commit is contained in:
Frank Skare
2021-03-30 23:48:54 +02:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -169,7 +169,7 @@ Class MTN
Proc.SkipStrings = {"frame=", "size="}
Proc.Encoding = Encoding.UTF8
Proc.Package = Package.MTN
Proc.AllowedExitCodes = {1}
Proc.AllowedExitCodes = {0, 1}
Proc.Arguments = """" + inputFile + """" + " -c " & Col & " -r " & Rows &
" -h " & SizeHeight & " -w " & SizeWidth & " -j " & PictureQuality &
" -D " & PictureDepth & " -P " & " -O " & """" & DirectoryLocation & """"
@@ -180,8 +180,8 @@ Class MTN
Proc.Header = "Creating Thumbnail"
Proc.SkipStrings = {"frame=", "size="}
Proc.Encoding = Encoding.UTF8
Proc.AllowedExitCodes = {1}
Proc.Package = Package.MTN
Proc.AllowedExitCodes = {0, 1}
Proc.Arguments = """" + inputFile + """" + " -c " & Col & " -r " & Rows &
" -h " & SizeHeight & " -w " & SizeWidth & " -j " & PictureQuality & " -D " & PictureDepth & " -P "
Proc.Start()
+2 -2
View File
@@ -339,12 +339,12 @@ Public Class Proc
Throw New SkipException
End If
If Not AllowedExitCodes.ContainsEx(ExitCode) Then
Dim errOutput = ProcessHelp.GetConsoleOutput(Package.Err.Path, "/ntstatus.h /winerror.h " & ExitCode)
If ExitCode > 0 AndAlso Not AllowedExitCodes.ContainsEx(ExitCode) Then
Dim sb = New StringBuilder()
sb.Append($"{Header} returned exit code: {ExitCode} (0x{ExitCode:X})")
If s.ErrorMessageExtendedByErr Then
Dim errOutput = ProcessHelp.GetConsoleOutput(Package.Err.Path, "/ntstatus.h /vfw.h /winerror.h " & ExitCode)
sb.Append($"{BR2}It's unclear what this exit code means, in case it's")
sb.Append($"{BR}a Windows system error then it possibly means:")
sb.Append($"{BR2}{errOutput}")