将退出之前的错误记录在日志文件中;修改批处理,无论编译成功失败都要恢复CMakeLists.txt

This commit is contained in:
gb 2022-05-21 09:19:21 +08:00
parent 75af228072
commit fc2a45efab
2 changed files with 8 additions and 4 deletions

View File

@ -88,11 +88,12 @@ make
if [ $? -ne 0 ];then
echo "--------------------------------------make fail---------------------------------------"
exit 1
fi
#exit 1 # commented, we should restore the CMakeLists.txts...
else
echo "--------------------------------------make succeed------------------------------------"
fi
make
#make
if [ -f ../code_device/hgsane/CMakeLists.txtbkp ]; then
mv ../code_device/hgsane/CMakeLists.txtbkp ../code_device/hgsane/CMakeLists.txt

View File

@ -384,8 +384,11 @@ void hg_scanner_200::thread_handle_usb_read(void)
break;
}
}
//else
else
{
// notify_ui_working_status(hg_scanner::error_description((scanner_err)prev_err).c_str(), SANE_EVENT_ERROR, prev_err);
HG_VLOG_MINI_1(LOG_LEVEL_WARNING, "-x-x-x-: USB thread error: %s\n", hg_scanner::strerr((scanner_err)prev_err).c_str());
}
prev_err = ret;
}
this_thread::sleep_for(chrono::milliseconds(2));