It is discouraged to simply catch System.Exception. Instead, only the "known" exceptions should be caught.
System.Exception
Now, this sometimes leads to unnecce
@Micheal
Slightly revised version of your code:
catch (Exception ex) { Type exType = ex.GetType(); if (exType == typeof(System.FormatException) || exType == typeof(System.OverflowException) { WebId = Guid.Empty; } else { throw; } }
String comparisons are ugly and slow.