diff --git a/autotests/run.bat b/autotests/run.bat index 831bcac9..3f7ccf79 100644 --- a/autotests/run.bat +++ b/autotests/run.bat @@ -66,7 +66,7 @@ setlocal set CPP=%~n1.cpp ..\bin\srefc-core %1 2> __error.txt - if errorlevel 1 ( + if errorlevel 100 ( echo COMPILER ON %1 FAILS, SEE __error.txt exit ) diff --git a/autotests/run.sh b/autotests/run.sh index 1a358969..531deab4 100755 --- a/autotests/run.sh +++ b/autotests/run.sh @@ -43,7 +43,7 @@ run_test_aux.BAD-SYNTAX() { EXE=${SREF%%.sref} ../bin/srefc-core $SREF 2>__error.txt - if [ $? -gt 0 ]; then + if [ $? -ge 100 ]; then echo COMPILER ON $SREF FAILS, SEE __error.txt exit fi diff --git a/src/srlib/refalrts.cpp b/src/srlib/refalrts.cpp index db2c6d4c..f4479d4f 100644 --- a/src/srlib/refalrts.cpp +++ b/src/srlib/refalrts.cpp @@ -2864,16 +2864,16 @@ int main(int argc, char **argv) { return 0; case refalrts::cRecognitionImpossible: - return 1; + return 101; case refalrts::cNoMemory: - return 2; + return 102; case refalrts::cExit: return refalrts::vm::g_ret_code; default: - fprintf(stderr, "INTERNAL ERROR: check switch in main"); - return 5; + fprintf(stderr, "INTERNAL ERROR: check switch in main (res = %d)\n", res); + return 105; } }