Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Error 203?

May
12,834
163
I wrote this little plugin.
Code:
INT WINAPI _GLE ( WCHAR* psz )
{
    DWORD le = GetLastError();
    Sprintf(psz, L"%lu", le);
    return 0;
}

No matter how I use it, it gives 203.

Code:
v:\> type I_do_not_exist & echo %_gle
TCC: (Sys) The system cannot find the file specified.
 "V:\I_do_not_exist"
203

v:\> echo %@errtext[203]
The system could not find the environment option that was entered.
 
TCC is making a few hundred Windows API calls between the TYPE and the ECHO.
And I'm going to guess that the last one is an attempt to expand an environment variable named _GLE.
 
Isn't that what %_SYSERR is for?
I was trying to get around what seems to be a shortcoming of _SYSERR. It's not set if you have an "ON ERROR" routine. See my recent post in "Suggestions".

That's somewhat of a catch-22. If you want _SYSERR set, you can't have an "ON ERROR" routine. But without an "ON ERROR" routine, by the time you look at _SYSERR, you have already seen an error message.

IMHO, an "ON ERROR" routine is THE place to be looking at _SYSERR.
 

Similar threads

Back
Top