Fix #2647 make robust against error returns
Fix #2647 make robust against error returns

radiasoft/sirepo,mkeilman/sirepo,radiasoft/sirepo,radiasoft/sirepo,radiasoft/sirepo,mkeilman/sirepo,radiasoft/sirepo,mkeilman/sirepo,mkeilman/sirepo