Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
STR problem (*solved*)
#12
LCD Wrote:
boriel Wrote:zxb.exe already returns an errorlevel <> 0 if there were an error (this is the standard behavior). You can however tell the compiler to use a different file (--stderr), but it will not separate warnings from errors. I suppose I will have to add a flag for that.
No chance to read the error level because error level cannot be readed out,
Yes you can! Try this:
Quote:C:\>zxb.exe
Usage: zxb.py <input file> [options]

zxb.py: error: missing input file. (Try -h)
C:\>echo %errorlevel%
2
The environment variable %errorlevel% only returns 0 on successful compilations. This value is also returned in most APIs when executing a external program as "return code" or "exit value" or similar.

Quote: but you send the usual compiler warning (INFO) like these:
This will be transformed into :remark: or :info: codes (like warnings, but less important) and also output to stderr in the next version (I've been so busy fixing bugs I couldn't do this before).
Anyway, I will add a flags for warnings and infos like '--warnings-file' and '--info-file' so you can isolate warnings from error msgs, etc.


Messages In This Thread

Forum Jump:


Users browsing this thread: 5 Guest(s)