ITabUnknownParameterException.SetParamName

Syntax

SetParamName (Value: String);

Parameters

Value. Parameter name.

Description

The SetParamName method sets function name in instance of the error that appears on writing the function with incorrect parameter type in the cell.

Comments

If any function with parameters is written to the cell table with incorrect parameter type, then corresponding error message is displayed:

The method allows to change parameter name.

Example

Executing the example requires a regular report with connected unit, the SET_PARAM_NAME is the unit identifier. One of report cells contains text set as hyperlink. Clicking the hyperlink sets the Run Procedure/Function action. Determine Test as procedure or function.

This example is an event handling unit for a regular report.

Add a link to the Tab system assembly.

Sub RaiseExceptionUnknownParam(Value: String);
Var
    Ex: ITabUnknownParameterException;
Begin
    Ex := 
New TabUnknownParameterException.CreateEx;
    Ex.SetParamName(Value);
    
Raise Ex;
End Sub RaiseExceptionUnknownParam;


Public Function Test: Variant;
Begin
    RaiseExceptionUnknownParam(
"UnknownParameter");
    
Return "";
End Function Test;

After executing the example the regular report will display error message containing the UnknownParameter Unknown Identifier text. That is, new parameter name is given on throwing an exception.

See also:

ITabUnknownParameterException