ES, -no-result-error

General discussion related to "Everything".
Post Reply
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

ES, -no-result-error

Post by therube »

ES

-no-result-error may PRINT something like, Error 9: No results found.
if no results are found

why do that instead of just setting ERRORLEVEL ?

you could do something like 2>nul, but i'd rather not
(& not sure why not, but probably for some reason?)
(does it matter to me that the message gets printed? probably not? so then, why the above?)


i'll also note that something like

> if NOT %errorlevel% EQU 0 goto fin:

does not PRINT anything (it simply goes to fin:)
where

> @if NOT %errorlevel% EQU 0 goto fin:

DOES PRINT
why is that?


2>nul
no, i wouldn't want to do that (well, maybe unless it was an Error 9: case)
because then you wouldn't see something like the IPC message if Everything wasn't running


so...

i guess it's not going to hurt anything if the message happens to turn up.
:-)
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: ES, -no-result-error

Post by void »

ES writes errors to the standard error file.

By default this is the console.

You can hide error messages with:
2>nul
(redirect error output to nothing)



It's useful for the user to see error messages.
Otherwise, they might have a hard time working out why there are no results.

For full control, use a BAT file, disable error output and check the ERRORLEVEL.
Optionally display your own error messages.


if vs @if
if
will output the if statement to the console.
@if
will not output the if statement to the console.

You should still see ES output.



The error messages might get in the way if you are redirecting to a file or piping to another program.
In this case, disable error output and handle ERRORLEVEL.
Post Reply