src/BloomExe/Utils/MiscUtils.cs
/// <summary>
/// Suppresses an "unused variable" warning for the exception variable in a catch block (by giving it this reference)
/// </summary>
/// <remarks>This can be useful because it allows you to keep the exception variable, even if the catch block doesn't organically reference it.
/// You may want this because the exception variable in the catch provides an easy way to view the exception in the debugger.
/// (Of course, you can also add a watch for $exception instead).
/// </remarks>
Suppresses an "unused variable" warning for the exception variable in a catch block (by giving it this reference)
Suppresses an " unused variable " warning for the exception variable in a catch block ( by giving it this reference )
public static void SuppressUnusedExceptionVarWarning(Exception e)
		{
			if (e == null)
				return;
			Debug.WriteLine(e.ToString());
		}
public static void SuppressUnusedExceptionVarWarning ( Exception e ) { if ( e == null ) return ; Debug . WriteLine ( e . ToString ( ) ) ; }
Suppresses an "unused variable" warning for the exception variable in a catch block (by giving it this reference)
Suppresses an " unused variable " warning for the exception variable in a catch block ( by giving it this reference )
// Paranoia // For now, we just write it to Debug // If desired, we could write it to the log file, or report to Sentry, etc...
e
Exception
remarks
This can be useful because it allows you to keep the exception variable, even if the catch block doesn't organically reference it.
You may want this because the exception variable in the catch provides an easy way to view the exception in the debugger.
(Of course, you can also add a watch for $exception instead).
This can be useful because it allows you to keep the exception variable even if the catch block doesn ' t organically reference it . You may want this because the exception variable in the catch provides an easy way to view the exception in the debugger . ( Of course you can also add a watch for $exception instead ) .