Which of the two exceptions was called?
- by Rob
If I have a routine that can throw an ArgumentException in two places, something like...
if (Var1 == null)
{
throw new ArgumentException ("Var1 is null, this cannot be!");
}
if (Val2 == null)
{
throw new ArgumentException ("Var2 is null, this cannot be either!");
}
What’s the best way of determining in my calling procedure which of the two exceptions was thrown?
Or
Am I doing this in the wrong fashion?