G
Guest
I have the following code and when the exception is raised the OS displays a nasty Stop dialog box
it says an unhandled exception occured, gives 3 buttons to click details, contintue Quit... i do not want this ugly thing to display, what am i missing from the code below? am i not catching that exception and displaying my own error message? so why is the other one coming up after mine
public bool isInteger(string str
int i=0
bool res=false
if (str != null)
try
i = Int32.Parse(str)
res = true
}
catch (FormatException e)
MessageBox.Show("Make sure to input only numeric values");
}
return res
}
it says an unhandled exception occured, gives 3 buttons to click details, contintue Quit... i do not want this ugly thing to display, what am i missing from the code below? am i not catching that exception and displaying my own error message? so why is the other one coming up after mine
public bool isInteger(string str
int i=0
bool res=false
if (str != null)
try
i = Int32.Parse(str)
res = true
}
catch (FormatException e)
MessageBox.Show("Make sure to input only numeric values");
}
return res
}