c# - Which of the two exceptions was called? -


If I have a routine that can throw an argument expansion in two places, something like this ...

  if (on top 1 == blank) {new argument expression ("Var1 is zero, it can not be!"); } If (wall 2 == faucet) {new argument expression ("Var2 is zero, it can not be either!"); }  

What is the best way to determine my calling process in which two exceptions were thrown?

Or

Am I doing this wrong fashion?

Pass the name of the variable (Val1, Val2 etc.) in the second argument argument argument creator becomes the argument is. Exception. Paramenama Property


Comments