From fe78852b2634c7f9f7d1c0ed8343233ceaf13a17 Mon Sep 17 00:00:00 2001 From: de4dot Date: Fri, 10 Feb 2012 16:20:40 +0100 Subject: [PATCH] Pretty much any type of exception can occur so catch 'em all --- de4dot.cui/FilesDeobfuscator.cs | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/de4dot.cui/FilesDeobfuscator.cs b/de4dot.cui/FilesDeobfuscator.cs index c7a534dd..3188365b 100644 --- a/de4dot.cui/FilesDeobfuscator.cs +++ b/de4dot.cui/FilesDeobfuscator.cs @@ -192,20 +192,8 @@ namespace de4dot.cui { catch (BadImageFormatException) { return false; // Not a .NET file } - catch (ArgumentOutOfRangeException) { - Log.w("Could not load file (argument out of range): {0}", file.Filename); - return false; - } - catch (UnauthorizedAccessException) { - Log.w("Could not load file (not authorized): {0}", file.Filename); - return false; - } - catch (NullReferenceException) { - Log.w("Could not load file (null ref): {0}", file.Filename); - return false; - } - catch (IOException) { - Log.w("Could not load file (io exception): {0}", file.Filename); + catch (Exception ex) { + Log.w("Could not load file ({0}): {1}", ex.GetType(), file.Filename); return false; }