catch (Exception e)



Hi,

One of the most common warnings i ran into playing with MD was:
/home/max/Projects/beagle_meta/Util/ExifData.cs(696,32): warning
CS0168: 
	The variable `e' is declared but never used

This is usually due to the following bit of code:

	try {...}
	catch (Exception e) {
		Logger.Log.Debug ("Something went wrong...");
	}

IIRC c# also allows:

	catch ()
or 
	catch (MyOwnException)

without defining a variable if it is not needed.

Is there any reason for always putting the e or the ex variables there
even though they are not used afterwards?


Max




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]