mirror of
https://github.com/SabreTools/BinaryObjectScanner.git
synced 2026-07-08 18:06:34 +00:00
Exception debugging should use Error stream
This commit is contained in:
@@ -53,7 +53,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return protections;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return protections;
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
// Prepare the returned protections
|
||||
@@ -312,7 +312,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
@@ -169,7 +169,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -237,7 +237,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,7 +349,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
@@ -109,7 +109,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -135,7 +135,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
@@ -106,7 +106,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -132,7 +132,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -178,7 +178,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
|
||||
// Only return if there are protections found
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace BinaryObjectScanner.FileType
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -141,7 +141,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -118,7 +118,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -92,7 +92,7 @@ namespace BinaryObjectScanner.Packer
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace ExtractionTool
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (includeDebug) Console.WriteLine(ex);
|
||||
if (includeDebug) Console.Error.WriteLine(ex);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user