Hello. In my application I am using message boxes to display error information.
try
{
// Something...
}
catch (SystemException ex)
{
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
This was fine at first, but as my program grows it becomes increasingly difficult to find the try-catch block where this error is generated. Is there a way to display the line of code or function in which the error was generated? I am using Microsoft Visual C# 2008 Express Edition. Thanks.