Standardize C# exceptions