.... is warning me not to use catch(Exception e) as too general.
But how to determine what exception type should I use if
try section may cause a few exception types? How to determine
what kind of exceptions could such lines cause?
XmlTextReader xTr = new XmlTextReader(p FileName);
XmlSerializer xS = new XmlSerializer(t ypeof(T));
Catch(Exception ) handles all of the possibilities and i don't
know how to choose more detailed exception type without
a risk of not catch one of them ...
But how to determine what exception type should I use if
try section may cause a few exception types? How to determine
what kind of exceptions could such lines cause?
XmlTextReader xTr = new XmlTextReader(p FileName);
XmlSerializer xS = new XmlSerializer(t ypeof(T));
Catch(Exception ) handles all of the possibilities and i don't
know how to choose more detailed exception type without
a risk of not catch one of them ...
Comment