>/* Below line writen for raise run-time SystemException::Exception */
>//-------------------------------------------------------------------
>object rnd;
>rnd = new System.Random();
>foo(rnd); /* foo has one object type argument.
> * but foo will type conversiton to o paramater
> * System.Text.Encoding its not possible and
> * throw SystemException.*/
>//-------------------------------------------------------------------
>
>and now trying in catch block and show ExceptionForm;
>
>mmAppBase.Log.WriteException(e);
>// Display the Exception form /*its parts of your sample code.*/
>mmExceptionForm ExceptForm = new mmExceptionForm(e.Message, e.StackTrace);
You can just throw a new exception and the default error manager will catch it and display the exception form for you. Here's a sample:
try
{
int iVar = int.Parse("ABC");
}
catch (System.Exception ex)
{
throw (ex);
}
However, if you really need to handle this yourself, you need to make sure you call the Show() method of the form.
try
{
int iVar = int.Parse("ABC");
}
catch (System.Exception ex)
{
mmExceptionForm ExceptForm = new mmExceptionForm(ex.Message, ex.StackTrace);
ExceptForm.Show();}