Fix for PUB-501. Catch illegal argument exception and display error message in R.