When f_FUNCTION returns GetLastError()?

May 20, 2008
9,281
62
Syracuse, NY, USA
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,975
98
> 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
 
May 20, 2008
9,281
62
Syracuse, NY, USA
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