Click or drag to resize

BasicNoUIObjReportError Method

Reports an error generated during a Handler or Module object call.

Namespace: WinWrap.Basic.Server
Assembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntax
public bool ReportError(
	Exception err
)

Parameters

err  Exception
The exception thrown by the Handler or Module call.

Return Value

Boolean
True if the error line was successfully displayed.

Implements

IBasicNoUIReportError(Exception)
Remarks
Execution is not terminated. Set the Run property to False after ReportError if you want to terminate execution.

If possible the line in the module that caused the error is highlighted. Otherwise, it shows a message box explaining the error.

A call (or evaluate) will throw TerminatedException if scripting code is terminated by

  • an End statement
  • an Exit All statement
  • user selecting Run|End
  • setting the Run property to False
  • calling the Shutdown method
If you don't want to display that error, don't call ReportError.
Example
Report the handler call's error:
try
{
    handler.Call();
}
catch (TerminatedException e1)
{
    // ignore this error
}
catch (Exception e2)
{
    basicIdeCtl1.ReportError(e2);
}
See Also