解决算法出错时程序崩溃 → 进行错误捕获
This commit is contained in:
@ -243,8 +243,15 @@ def main():
|
|||||||
# print(header, flush=True)
|
# print(header, flush=True)
|
||||||
|
|
||||||
# sif算法处理
|
# sif算法处理
|
||||||
|
try:
|
||||||
processing(inputs.standard_sif, inputs.folder, inputs.outfile,
|
processing(inputs.standard_sif, inputs.folder, inputs.outfile,
|
||||||
inputs.pars, data, header, inputs.sky_p, inputs.method)
|
inputs.pars, data, header, inputs.sky_p, inputs.method)
|
||||||
|
except Exception as e:
|
||||||
|
print('sif error: %s' % e, flush=True)
|
||||||
|
else: # 如果打开没有出错
|
||||||
|
print('Sif compute Completed!')
|
||||||
|
finally:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Reference in New Issue
Block a user