[SPARK-14594][SPARKR] check execution return status code
[SPARK-14594][SPARKR] check execution return status code

## What changes were proposed in this pull request?

When JVM backend fails without going proper error handling (eg. process crashed), the R error message could be ambiguous.

```
Error in if (returnStatus != 0) { : argument is of length zero
```

This change attempts to make it more clear (however, one would still need to investigate why JVM fails)

## How was this patch tested?

manually

Author: felixcheung <felixcheung_m@hotmail.com>

Closes #12622 from felixcheung/rreturnstatus.

facaiy/spark,aray/spark,jiangxb1987/spark,patrick-nicholson/spark,gengliangwang/spark,jkbradley/spark,Aegeaner/spark,big-pegasus/spark,rikima/spark,milliman/spark,akopich/spark,shaneknapp/spark,facaiy/spark,dhruve/spark,highfei2011/spark,icexelloss/spark,chuckchen/spark,wangmiao1981/spark,witgo/spark,rekhajoshm/spark,aosagie/spark,bOOm-X/spark,taroplus/spark,mahak/spark,zzcclp/spark,kiszk/spark,Panos-Bletsos/spark-cost-model-optimizer,panfengfeng/spark,gengliangwang/spark,someorz/spark,tejasapatil/spark,loneknightpy/spark,lxsmnv/spark,spark-test/spark,xuanyuanking/spark,joseph-torres/spark,facaiy/spark,setjet/spark,guoxiaolongzte/spark,dhruve/spark,ConeyLiu/spark,SnappyDataInc/spark,gengliangwang/spark,MLnick/spark,bdrillard/spark,highfei2011/spark,kissmetrics/spark,ConeyLiu/spark,panfengfeng/spark,debugger87/spark,HyukjinKwon/spark,lxsmnv/spark,darionyaphet/spark,saltstar/spark,ioana-delaney/spark,stanzhai/spark,JoshRosen/spark,mzl9039/spark,guoxiaolongzte/spark,hhbyyh/spark,tejasapatil/spark,ddna1021/spark,lxsmnv/spark,apache/spark,zero323/spark,rednaxelafx/apache-spark,mdespriee/spark,szhem/spark,big-pegasus/spark,stanzhai/spark,BryanCutler/spark,narahari92/spark,rikima/spark,LantaoJin/spark,jiangxb1987/spark,mzl9039/spark,rekhajoshm/spark,LantaoJin/spark,guoxiaolongzte/spark,rezasafi/spark,highfei2011/spark,janewangfb/spark,lvdongr/spark,JoshRosen/spark,MLnick/spark,hvanhovell/spark,vinodkc/spark,publicRoman/spark,Panos-Bletsos/spark-cost-model-optimizer,bOOm-X/spark,mzl9039/spark,witgo/spark,facaiy/spark,narahari92/spark,goldmedal/spark,liutang123/spark,metamx/spark,nchammas/spark,shubhamchopra/spark,spark-test/spark,saltstar/spark,ConeyLiu/spark,techaddict/spark,SnappyDataInc/spark,ibm-research-ireland/sparkoscope,saturday-shi/spark,nchammas/spark,maropu/spark,nlalevee/spark,nilsgrabbert/spark,mike0sv/spark,szhem/spark,jrshust/spark,mike0sv/spark,mahak/spark,gengliangwang/spark,WeichenXu123/spark,lxsmnv/spark,rikima/spark,dhruve/spark,BryanCutler/spark,bdrillard/spark,andrewor14/spark,UndeadBaneGitHub/spark,xuanyuanking/spark,jianran/spark,big-pegasus/spark,Aegeaner/spark,dhruve/spark,mike0sv/spark,publicRoman/spark,hvanhovell/spark,gioenn/xSpark,janewangfb/spark,narahari92/spark,bOOm-X/spark,hhbyyh/spark,JoshRosen/spark,markhamstra/spark,aosagie/spark,HyukjinKwon/spark,joseph-torres/spark,liutang123/spark,skonto/spark,shaneknapp/spark,sahilTakiar/spark,dbtsai/spark,actuaryzhang/spark,zhouyejoe/spark,caneGuy/spark,1haodian/spark,ron8hu/spark,loneknightpy/spark,minixalpha/spark,spark-test/spark,poffuomo/spark,mdespriee/spark,markhamstra/spark,kiszk/spark,gengliangwang/spark,mike0sv/spark,liyichao/spark,pgandhi999/spark,1haodian/spark,taroplus/spark,SnappyDataInc/spark,loneknightpy/spark,xflin/spark,ericvandenbergfb/spark,pgandhi999/spark,akopich/spark,zhouyejoe/spark,huang1900/spark,zhouyejoe/spark,jianran/spark,aray/spark,ahnqirage/spark,apache-spark-on-k8s/spark,adrian-ionescu/apache-spark,adrian-ionescu/apache-spark,SHASHANKB/spark,sahilTakiar/spark,kissmetrics/spark,highfei2011/spark,aosagie/spark,holdenk/spark,ueshin/apache-spark,hvanhovell/spark,maropu/spark,actuaryzhang/spark,narahari92/spark,stanzhai/spark,gioenn/xSpark,aosagie/spark,zzcclp/spark,dhruve/spark,lxsmnv/spark,taroplus/spark,ioana-delaney/spark,techaddict/spark,esi-mineset/spark,kissmetrics/spark,sachintyagi22/spark,actuaryzhang/spark,bravo-zhang/spark,yanboliang/spark,BryanCutler/spark,panfengfeng/spark,jiangxb1987/spark,aosagie/spark,kevinyu98/spark,saltstar/spark,cloud-fan/spark,debugger87/spark,janewangfb/spark,sureshthalamati/spark,srowen/spark,liyichao/spark,eyalfa/spark,rikima/spark,ueshin/apache-spark,JerryLead/spark,holdenk/spark,jiangxb1987/spark,byakuinss/spark,WindCanDie/spark,ptkool/spark,ptkool/spark,hvanhovell/spark,milliman/spark,rikima/spark,setjet/spark,SHASHANKB/spark,tejasapatil/spark,hvanhovell/spark,stanzhai/spark,dbtsai/spark,jianran/spark,aokolnychyi/spark,goldmedal/spark,brad-kaiser/spark,saturday-shi/spark,actuaryzhang/spark,LantaoJin/spark,guoxiaolongzte/spark,zuotingbing/spark,Panos-Bletsos/spark-cost-model-optimizer,ron8hu/spark,cloud-fan/spark,szhem/spark,SnappyDataInc/spark,dongjoon-hyun/spark,ron8hu/spark,ioana-delaney/spark,ericvandenbergfb/spark,jianran/spark,zuotingbing/spark,minixalpha/spark,nlalevee/spark,ericvandenbergfb/spark,jlopezmalla/spark,rezasafi/spark,ibm-research-ireland/sparkoscope,setjet/spark,wangmiao1981/spark,jrshust/spark,xflin/spark,jrshust/spark,bravo-zhang/spark,rikima/spark,JoshRosen/spark,goldmedal/spark,andrewor14/spark,esi-mineset/spark,nchammas/spark,narahari92/spark,kimoonkim/spark,bravo-zhang/spark,skonto/spark,WindCanDie/spark,markhamstra/spark,eyalfa/spark,kevinyu98/spark,WeichenXu123/spark,Aegeaner/spark,goldmedal/spark,aray/spark,rednaxelafx/apache-spark,ConeyLiu/spark,rednaxelafx/apache-spark,bravo-zhang/spark,holdenk/spark,narahari92/spark,SHASHANKB/spark,darionyaphet/spark,1haodian/spark,JerryLead/spark,rednaxelafx/apache-spark,zhouyejoe/spark,icexelloss/spark,ericvandenbergfb/spark,icexelloss/spark,LantaoJin/spark,huang1900/spark,srowen/spark,icexelloss/spark,ptkool/spark,vinodkc/spark,caneGuy/spark,milliman/spark,xuanyuanking/spark,tejasapatil/spark,liutang123/spark,darionyaphet/spark,szhem/spark,kimoonkim/spark,eyalfa/spark,UndeadBaneGitHub/spark,ddna1021/spark,liutang123/spark,jkbradley/spark,xuanyuanking/spark,alunarbeach/spark,akopich/spark,kevinyu98/spark,holdenk/spark,maropu/spark,szhem/spark,kimoonkim/spark,apache-spark-on-k8s/spark,janewangfb/spark,srowen/spark,yanboliang/spark,zzcclp/spark,wzhfy/spark,nilsgrabbert/spark,ahnqirage/spark,jianran/spark,ajaysaini725/spark,janewangfb/spark,saturday-shi/spark,lxsmnv/spark,adrian-ionescu/apache-spark,ConeyLiu/spark,LantaoJin/spark,aray/spark,LantaoJin/spark,WeichenXu123/spark,debugger87/spark,cin/spark,eyalfa/spark,alunarbeach/spark,sachintyagi22/spark,skonto/spark,LantaoJin/spark,publicRoman/spark,hhbyyh/spark,minixalpha/spark,map222/spark,mike0sv/spark,dbtsai/spark,pgandhi999/spark,sahilTakiar/spark,setjet/spark,minixalpha/spark,patrick-nicholson/spark,vinodkc/spark,saltstar/spark,dongjoon-hyun/spark,wangmiao1981/spark,ptkool/spark,esi-mineset/spark,alunarbeach/spark,witgo/spark,poffuomo/spark,byakuinss/spark,saltstar/spark,aokolnychyi/spark,michalsenkyr/spark,jlopezmalla/spark,jlopezmalla/spark,rezasafi/spark,xuanyuanking/spark,ueshin/apache-spark,ibm-research-ireland/sparkoscope,bdrillard/spark,panfengfeng/spark,dhruve/spark,liutang123/spark,publicRoman/spark,bdrillard/spark,1haodian/spark,map222/spark,ueshin/apache-spark,wangyum/spark,loneknightpy/spark,metamx/spark,Panos-Bletsos/spark-cost-model-optimizer,wzhfy/spark,shuangshuangwang/spark,poffuomo/spark,minixalpha/spark,ueshin/apache-spark,gengliangwang/spark,rezasafi/spark,kiszk/spark,skonto/spark,jlopezmalla/spark,ibm-research-ireland/sparkoscope,minixalpha/spark,metamx/spark,tengpeng/spark,JoshRosen/spark,jianran/spark,shaneknapp/spark,SnappyDataInc/spark,sachintyagi22/spark,debugger87/spark,stanzhai/spark,tejasapatil/spark,markhamstra/spark,tejasapatil/spark,ron8hu/spark,patrick-nicholson/spark,patrick-nicholson/spark,michalsenkyr/spark,huang1900/spark,pgandhi999/spark,rekhajoshm/spark,metamx/spark,huang1900/spark,brad-kaiser/spark,kimoonkim/spark,xflin/spark,gengliangwang/spark,sureshthalamati/spark,alunarbeach/spark,JoshRosen/spark,setjet/spark,ahnqirage/spark,michalsenkyr/spark,Aegeaner/spark,jrshust/spark,WindCanDie/spark,shubhamchopra/spark,SHASHANKB/spark,nilsgrabbert/spark,wzhfy/spark,BryanCutler/spark,nlalevee/spark,MLnick/spark,ajaysaini725/spark,hvanhovell/spark,UndeadBaneGitHub/spark,spark-test/spark,shubhamchopra/spark,gioenn/xSpark,shuangshuangwang/spark,highfei2011/spark,tengpeng/spark,markhamstra/spark,kissmetrics/spark,jiangxb1987/spark,UndeadBaneGitHub/spark,michalsenkyr/spark,nilsgrabbert/spark,zzcclp/spark,rekhajoshm/spark,apache/spark,adrian-ionescu/apache-spark,liyichao/spark,liyichao/spark,zzcclp/spark,ajaysaini725/spark,kevinyu98/spark,aokolnychyi/spark,ibm-research-ireland/sparkoscope,mahak/spark,bdrillard/spark,ioana-delaney/spark,icexelloss/spark,nlalevee/spark,maropu/spark,jiangxb1987/spark,taroplus/spark,milliman/spark,ioana-delaney/spark,joseph-torres/spark,WeichenXu123/spark,wzhfy/spark,witgo/spark,andrewor14/spark,liyichao/spark,vinodkc/spark,nilsgrabbert/spark,srowen/spark,WindCanDie/spark,shubhamchopra/spark,JerryLead/spark,janewangfb/spark,eyalfa/spark,rednaxelafx/apache-spark,milliman/spark,bravo-zhang/spark,spark-test/spark,milliman/spark,panfengfeng/spark,bdrillard/spark,ahnqirage/spark,alunarbeach/spark,dongjoon-hyun/spark,mahak/spark,aosagie/spark,aray/spark,mzl9039/spark,actuaryzhang/spark,mzl9039/spark,publicRoman/spark,poffuomo/spark,wangmiao1981/spark,JoshRosen/spark,big-pegasus/spark,tengpeng/spark,bOOm-X/spark,vinodkc/spark,maropu/spark,guoxiaolongzte/spark,skonto/spark,kissmetrics/spark,debugger87/spark,goldmedal/spark,wangmiao1981/spark,maropu/spark,ajaysaini725/spark,WeichenXu123/spark,matthewfranglen/spark,setjet/spark,stanzhai/spark,Panos-Bletsos/spark-cost-model-optimizer,zero323/spark,shubhamchopra/spark,xuanyuanking/spark,wangyum/spark,cin/spark,chuckchen/spark,techaddict/spark,xflin/spark,byakuinss/spark,bOOm-X/spark,vinodkc/spark,goldmedal/spark,shubhamchopra/spark,cloud-fan/spark,rezasafi/spark,szhem/spark,hhbyyh/spark,cloud-fan/spark,mdespriee/spark,tengpeng/spark,liutang123/spark,saltstar/spark,techaddict/spark,ron8hu/spark,map222/spark,highfei2011/spark,andrewor14/spark,patrick-nicholson/spark,ibm-research-ireland/sparkoscope,nlalevee/spark,dongjoon-hyun/spark,shaneknapp/spark,HyukjinKwon/spark,brad-kaiser/spark,jkbradley/spark,rekhajoshm/spark,andrewor14/spark,joseph-torres/spark,cin/spark,panfengfeng/spark,spark-test/spark,map222/spark,poffuomo/spark,UndeadBaneGitHub/spark,rednaxelafx/apache-spark,someorz/spark,liyichao/spark,cloud-fan/spark,rezasafi/spark,ptkool/spark,SHASHANKB/spark,bOOm-X/spark,big-pegasus/spark,MLnick/spark,HyukjinKwon/spark,rikima/spark,holdenk/spark,sahilTakiar/spark,facaiy/spark,bravo-zhang/spark,dongjoon-hyun/spark,zhouyejoe/spark,skonto/spark,ahnqirage/spark,kiszk/spark,akopich/spark,shuangshuangwang/spark,apache-spark-on-k8s/spark,ueshin/apache-spark,ddna1021/spark,szhem/spark,jkbradley/spark,shuangshuangwang/spark,gioenn/xSpark,ericvandenbergfb/spark,goldmedal/spark,rednaxelafx/apache-spark,patrick-nicholson/spark,SHASHANKB/spark,someorz/spark,michalsenkyr/spark,yanboliang/spark,ericvandenbergfb/spark,aokolnychyi/spark,yanboliang/spark,caneGuy/spark,apache-spark-on-k8s/spark,wangyum/spark,brad-kaiser/spark,srowen/spark,kevinyu98/spark,Aegeaner/spark,brad-kaiser/spark,caneGuy/spark,eyalfa/spark,mike0sv/spark,vinodkc/spark,ConeyLiu/spark,wangyum/spark,caneGuy/spark,poffuomo/spark,minixalpha/spark,dhruve/spark,debugger87/spark,eyalfa/spark,JerryLead/spark,mike0sv/spark,WindCanDie/spark,taroplus/spark,apache/spark,byakuinss/spark,wangyum/spark,cin/spark,srowen/spark,bOOm-X/spark,zuotingbing/spark,jrshust/spark,nilsgrabbert/spark,zuotingbing/spark,saturday-shi/spark,apache/spark,chuckchen/spark,witgo/spark,SHASHANKB/spark,aokolnychyi/spark,mdespriee/spark,darionyaphet/spark,brad-kaiser/spark,JerryLead/spark,UndeadBaneGitHub/spark,patrick-nicholson/spark,sahilTakiar/spark,pgandhi999/spark,zuotingbing/spark,techaddict/spark,rekhajoshm/spark,poffuomo/spark,hhbyyh/spark,publicRoman/spark,lvdongr/spark,gioenn/xSpark,sureshthalamati/spark,zero323/spark,actuaryzhang/spark,techaddict/spark,holdenk/spark,BryanCutler/spark,rekhajoshm/spark,aokolnychyi/spark,JerryLead/spark,WindCanDie/spark,publicRoman/spark,nchammas/spark,facaiy/spark,ron8hu/spark,darionyaphet/spark,zhouyejoe/spark,facaiy/spark,joseph-torres/spark,dbtsai/spark,MLnick/spark,akopich/spark,MLnick/spark,adrian-ionescu/apache-spark,highfei2011/spark,saturday-shi/spark,nchammas/spark,pgandhi999/spark,adrian-ionescu/apache-spark,wzhfy/spark,sachintyagi22/spark,zzcclp/spark,rezasafi/spark,cin/spark,huang1900/spark,dbtsai/spark,chuckchen/spark,shaneknapp/spark,ueshin/apache-spark,lvdongr/spark,dbtsai/spark,map222/spark,icexelloss/spark,map222/spark,HyukjinKwon/spark,lxsmnv/spark,bravo-zhang/spark,mdespriee/spark,nlalevee/spark,holdenk/spark,big-pegasus/spark,chuckchen/spark,wangmiao1981/spark,narahari92/spark,gioenn/xSpark,aosagie/spark,esi-mineset/spark,shaneknapp/spark,saturday-shi/spark,mahak/spark,big-pegasus/spark,pgandhi999/spark,markhamstra/spark,zuotingbing/spark,lvdongr/spark,tengpeng/spark,michalsenkyr/spark,aray/spark,ahnqirage/spark,nilsgrabbert/spark,ConeyLiu/spark,saturday-shi/spark,zero323/spark,guoxiaolongzte/spark,WindCanDie/spark,chuckchen/spark,ajaysaini725/spark,andrewor14/spark,kimoonkim/spark,nchammas/spark,tejasapatil/spark,shubhamchopra/spark,MLnick/spark,wangmiao1981/spark,mzl9039/spark,alunarbeach/spark,hhbyyh/spark,joseph-torres/spark,panfengfeng/spark,wzhfy/spark,esi-mineset/spark,kiszk/spark,byakuinss/spark,aokolnychyi/spark,someorz/spark,sahilTakiar/spark,aray/spark,loneknightpy/spark,darionyaphet/spark,setjet/spark,chuckchen/spark,dbtsai/spark,techaddict/spark,markhamstra/spark,yanboliang/spark,kimoonkim/spark,ddna1021/spark,zero323/spark,jrshust/spark,liyichao/spark,lvdongr/spark,michalsenkyr/spark,andrewor14/spark,cloud-fan/spark,debugger87/spark,ron8hu/spark,yanboliang/spark,ptkool/spark,ddna1021/spark,adrian-ionescu/apache-spark,someorz/spark,kiszk/spark,metamx/spark,apache-spark-on-k8s/spark,hhbyyh/spark,UndeadBaneGitHub/spark,ibm-research-ireland/sparkoscope,loneknightpy/spark,ericvandenbergfb/spark,stanzhai/spark,apache-spark-on-k8s/spark,akopich/spark,xflin/spark,wangyum/spark,mahak/spark,xuanyuanking/spark,byakuinss/spark,apache/spark,joseph-torres/spark,kissmetrics/spark,yanboliang/spark,huang1900/spark,brad-kaiser/spark,milliman/spark,witgo/spark,srowen/spark,ajaysaini725/spark,1haodian/spark,wzhfy/spark,sahilTakiar/spark,caneGuy/spark,sureshthalamati/spark,spark-test/spark,nchammas/spark,dongjoon-hyun/spark,shaneknapp/spark,mdespriee/spark,jianran/spark,zuotingbing/spark,sachintyagi22/spark,cin/spark,someorz/spark,tengpeng/spark,1haodian/spark,witgo/spark,guoxiaolongzte/spark,xflin/spark,metamx/spark,apache/spark,sachintyagi22/spark,BryanCutler/spark,hvanhovell/spark,Panos-Bletsos/spark-cost-model-optimizer,shuangshuangwang/spark,liutang123/spark,lvdongr/spark,ioana-delaney/spark,jlopezmalla/spark,zero323/spark,apache-spark-on-k8s/spark,esi-mineset/spark,dongjoon-hyun/spark,jrshust/spark,jkbradley/spark,mahak/spark,janewangfb/spark,metamx/spark,zzcclp/spark,ajaysaini725/spark,xflin/spark,mdespriee/spark,shuangshuangwang/spark,kevinyu98/spark,HyukjinKwon/spark,jlopezmalla/spark,jlopezmalla/spark,1haodian/spark,loneknightpy/spark,jkbradley/spark,jkbradley/spark,SnappyDataInc/spark,bdrillard/spark,sureshthalamati/spark,saltstar/spark,ioana-delaney/spark,JerryLead/spark,zhouyejoe/spark,gioenn/xSpark,apache/spark,akopich/spark,mzl9039/spark,ddna1021/spark,tengpeng/spark,caneGuy/spark,Panos-Bletsos/spark-cost-model-optimizer,darionyaphet/spark,map222/spark,HyukjinKwon/spark,SnappyDataInc/spark,taroplus/spark,ptkool/spark,Aegeaner/spark,ddna1021/spark,wangyum/spark,cin/spark,alunarbeach/spark,jiangxb1987/spark,kissmetrics/spark,ahnqirage/spark,skonto/spark,BryanCutler/spark,huang1900/spark,sureshthalamati/spark,cloud-fan/spark,actuaryzhang/spark,sureshthalamati/spark,shuangshuangwang/spark,sachintyagi22/spark,kimoonkim/spark,Aegeaner/spark,byakuinss/spark,WeichenXu123/spark,lvdongr/spark,maropu/spark,taroplus/spark,icexelloss/spark,WeichenXu123/spark,esi-mineset/spark,kiszk/spark,zero323/spark,kevinyu98/spark,nlalevee/spark,someorz/spark