mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Silenced the System.Drawing.Image exceptions
The ProfileAdapter and ShortcutAdapters used by the ImageListView Control unfortunately have to access the sizes of the bitmaps being loaded into the respective imagelistviews. I can't find anyway of stopping the GDI+ from complaining about the Bitmap being accessed by multiple different threads (as ImageListView creates one thread per image. This will be fixed once I move to this being a WPF application as we'll use a different control.
This commit is contained in:
@ -435,7 +435,7 @@ namespace HeliosPlus.GameLibraries
|
||||
}
|
||||
catch (ArgumentException ex)
|
||||
{
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames exception: {ex.Message}: {ex.InnerException}");
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames exception: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
|
||||
//we just want to ignore it if we try to add it twice....
|
||||
}
|
||||
|
||||
@ -558,28 +558,28 @@ namespace HeliosPlus.GameLibraries
|
||||
}
|
||||
catch (SecurityException ex)
|
||||
{
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames securityexception: {ex.Message}: {ex.InnerException}");
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames securityexception: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
|
||||
if (ex.Source != null)
|
||||
Console.WriteLine("SecurityException source: {0} - Message: {1}", ex.Source, ex.Message);
|
||||
throw;
|
||||
}
|
||||
catch (UnauthorizedAccessException ex)
|
||||
{
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames unauthorizedaccessexception: {ex.Message}: {ex.InnerException}");
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames unauthorizedaccessexception: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
|
||||
if (ex.Source != null)
|
||||
Console.WriteLine("UnauthorizedAccessException source: {0} - Message: {1}", ex.Source, ex.Message);
|
||||
throw;
|
||||
}
|
||||
catch (ObjectDisposedException ex)
|
||||
{
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames objectdisposedexceptions: {ex.Message}: {ex.InnerException}");
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames objectdisposedexceptions: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
|
||||
if (ex.Source != null)
|
||||
Console.WriteLine("ObjectDisposedException source: {0} - Message: {1}", ex.Source, ex.Message);
|
||||
throw;
|
||||
}
|
||||
catch (IOException ex)
|
||||
{
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames ioexception: {ex.Message}: {ex.InnerException}");
|
||||
Console.WriteLine($"SteamGame/GetAllInstalledGames ioexception: {ex.Message}: {ex.StackTrace} - {ex.InnerException}");
|
||||
// Extract some information from this exception, and then
|
||||
// throw it to the parent method.
|
||||
if (ex.Source != null)
|
||||
|
Reference in New Issue
Block a user