When f_FUNCTION returns GetLastError()?

#1
When a plugin variable function returns GetLastError() what extra text is expected in the error message?

I see, for example,

Code:
g:\projects\4utils\release> echo %@lc[u:\inet\ipv4.tct]
TCC: (Sys) The system cannot find the file specified.
 "%[u:\inet\ipv4.tct]"
without the plugin function name. Expected?

What's recommended to make it look a little better?

Thanks.
 

rconn

Administrator
Staff member
May 14, 2008
10,554
97
#2
> When a plugin variable function returns GetLastError() what extra text
> is expected in the error message?
>
> I see, for example,
>
> Code:
> ---------
> g:\projects\4utils\release> echo %@lc[u:\inet\ipv4.tct]
> TCC: (Sys) The system cannot find the file specified.
> "%[u:\inet\ipv4.tct]"
> ---------
> without the plugin function name. Expected?
Yes.


> What's recommended to make it look a little better?
If you return a negative error, TCC won't display any message. So you can
invent any wacky error text you like.

Rex Conn
JP Software
 
#3
On Thu, 10 Jun 2010 19:35:31 -0400, rconn <> wrote:

|If you return a negative error, TCC won't display any message. So you can
|invent any wacky error text you like.

Thanks. With or without an error message, it seems best to return 0 so that
**something** is substituted for %@FUNCTION[] and the command in which the
variable function is embedded will continue (see my query in the support forum
about @LINES[]). As with many/most builtin variable functions, an otherwise
impossible string (like "-1" for @FILESIZE[]) can indicate an error.
--
- Vince