Better error handling for C# error messages