BasicNoUIObjReportError Method |
Reports an error generated during a
Handler
or
Module object call.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxpublic bool ReportError(
Exception err
)
Public Function ReportError (
err As Exception
) As Boolean
public:
virtual bool ReportError(
Exception^ err
) sealed
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)
{
}
catch (Exception e2)
{
basicIdeCtl1.ReportError(e2);
}
Try
Handler.Call()
Catch e1 As TerminatedException
' ignore this error
Catch e2 As Exception
BasicIdeCtl1.ReportError(e2)
End Try
try
{
handler->Call();
}
catch (TerminatedException ^ e1)
{
}
catch (Exception ^ e2)
{
basicIdeCtl1->ReportError(e2);
}
See Also