Simplify error handling code in open_r and open_w
Simplify error handling code in open_r and open_w

tbarrongh/rstudio,suribes/rstudio,brsimioni/rstudio,suribes/rstudio,suribes/rstudio,JanMarvin/rstudio,jzhu8803/rstudio,more1/rstudio,brsimioni/rstudio,JanMarvin/rstudio,jrnold/rstudio,john-r-mcpherson/rstudio,JanMarvin/rstudio,maligulzar/Rstudio-instrumented,edrogers/rstudio,edrogers/rstudio,tbarrongh/rstudio,tbarrongh/rstudio,jar1karp/rstudio,vbelakov/rstudio,jzhu8803/rstudio,john-r-mcpherson/rstudio,john-r-mcpherson/rstudio,maligulzar/Rstudio-instrumented,thklaus/rstudio,nvoron23/rstudio,john-r-mcpherson/rstudio,jzhu8803/rstudio,sfloresm/rstudio,sfloresm/rstudio,more1/rstudio,JanMarvin/rstudio,nvoron23/rstudio,thklaus/rstudio,maligulzar/Rstudio-instrumented,more1/rstudio,jar1karp/rstudio,jar1karp/rstudio,githubfun/rstudio,thklaus/rstudio,sfloresm/rstudio,JanMarvin/rstudio,edrogers/rstudio,pssguy/rstudio,jrnold/rstudio,jrnold/rstudio,thklaus/rstudio,john-r-mcpherson/rstudio,vbelakov/rstudio,jar1karp/rstudio,githubfun/rstudio,brsimioni/rstudio,vbelakov/rstudio,githubfun/rstudio,githubfun/rstudio,edrogers/rstudio,tbarrongh/rstudio,thklaus/rstudio,githubfun/rstudio,more1/rstudio,sfloresm/rstudio,maligulzar/Rstudio-instrumented,jrnold/rstudio,pssguy/rstudio,maligulzar/Rstudio-instrumented,jrnold/rstudio,jzhu8803/rstudio,thklaus/rstudio,githubfun/rstudio,more1/rstudio,JanMarvin/rstudio,maligulzar/Rstudio-instrumented,piersharding/rstudio,tbarrongh/rstudio,piersharding/rstudio,jar1karp/rstudio,suribes/rstudio,githubfun/rstudio,john-r-mcpherson/rstudio,john-r-mcpherson/rstudio,pssguy/rstudio,thklaus/rstudio,Sage-Bionetworks/rstudio,vbelakov/rstudio,sfloresm/rstudio,edrogers/rstudio,JanMarvin/rstudio,suribes/rstudio,maligulzar/Rstudio-instrumented,Sage-Bionetworks/rstudio,john-r-mcpherson/rstudio,tbarrongh/rstudio,Sage-Bionetworks/rstudio,brsimioni/rstudio,brsimioni/rstudio,maligulzar/Rstudio-instrumented,Sage-Bionetworks/rstudio,brsimioni/rstudio,jrnold/rstudio,githubfun/rstudio,nvoron23/rstudio,JanMarvin/rstudio,jar1karp/rstudio,pssguy/rstudio,jzhu8803/rstudio,vbelakov/rstudio,sfloresm/rstudio,jar1karp/rstudio,jrnold/rstudio,tbarrongh/rstudio,piersharding/rstudio,maligulzar/Rstudio-instrumented,sfloresm/rstudio,Sage-Bionetworks/rstudio,Sage-Bionetworks/rstudio,sfloresm/rstudio,vbelakov/rstudio,edrogers/rstudio,jrnold/rstudio,suribes/rstudio,pssguy/rstudio,jzhu8803/rstudio,jrnold/rstudio,pssguy/rstudio,brsimioni/rstudio,brsimioni/rstudio,edrogers/rstudio,vbelakov/rstudio,suribes/rstudio,jzhu8803/rstudio,vbelakov/rstudio,nvoron23/rstudio,edrogers/rstudio,nvoron23/rstudio,suribes/rstudio,jzhu8803/rstudio,piersharding/rstudio,nvoron23/rstudio,more1/rstudio,jar1karp/rstudio,pssguy/rstudio,JanMarvin/rstudio,nvoron23/rstudio,piersharding/rstudio,piersharding/rstudio,piersharding/rstudio,Sage-Bionetworks/rstudio,more1/rstudio,more1/rstudio,jar1karp/rstudio,pssguy/rstudio,piersharding/rstudio,tbarrongh/rstudio,thklaus/rstudio,piersharding/rstudio