@@ -1922,18 +1922,16 @@ PREDICATE(r_eval_, 1)
1922
1922
1923
1923
catch (const Rcpp::eval_error& ex)
1924
1924
{
1925
- throw PlException (PlTerm_string (ex.what ())) ;
1925
+ PlCompound syntax (" evaluation_error" , PlTermv (A1)) ;
1926
+ PlCompound context (" context" , PlTermv (PlTerm_string (" foreign r_eval_/2" ), PlTerm_string (ex.what ()))) ;
1927
+ throw PlException (PlCompound (" error" , PlTermv (syntax, context))) ;
1926
1928
}
1927
1929
1928
- catch (std::runtime_error& ex)
1929
- {
1930
- throw PlException (PlTerm_string (ex.what ())) ;
1931
- }
1932
-
1933
- catch (std::exception & ex)
1930
+ catch (const std::exception & ex)
1934
1931
{
1935
- throw PlException (PlTerm_string (ex.what ())) ;
1936
- return false ;
1932
+ PlCompound syntax (" evaluation_error" , PlTermv (A1)) ;
1933
+ PlCompound context (" context" , PlTermv (PlTerm_string (" foreign r_eval_/2" ), PlTerm_string (ex.what ()))) ;
1934
+ throw PlException (PlCompound (" error" , PlTermv (syntax, context))) ;
1937
1935
}
1938
1936
1939
1937
catch (...)
@@ -1971,18 +1969,16 @@ PREDICATE(r_eval_, 2)
1971
1969
1972
1970
catch (const Rcpp::eval_error& ex)
1973
1971
{
1974
- throw PlException (PlTerm_string (ex.what ())) ;
1975
- }
1976
-
1977
- catch (std::runtime_error& ex)
1978
- {
1979
- throw PlException (PlTerm_string (ex.what ())) ;
1972
+ PlCompound syntax (" evaluation_error" , PlTermv (A1)) ;
1973
+ PlCompound context (" context" , PlTermv (PlTerm_string (" foreign r_eval_/2" ), PlTerm_string (ex.what ()))) ;
1974
+ throw PlException (PlCompound (" error" , PlTermv (syntax, context))) ;
1980
1975
}
1981
1976
1982
- catch (std::exception & ex)
1977
+ catch (const std::exception & ex)
1983
1978
{
1984
- throw PlException (PlTerm_string (ex.what ())) ;
1985
- return false ;
1979
+ PlCompound syntax (" evaluation_error" , PlTermv (A1)) ;
1980
+ PlCompound context (" context" , PlTermv (PlTerm_string (" foreign r_eval_/2" ), PlTerm_string (ex.what ()))) ;
1981
+ throw PlException (PlCompound (" error" , PlTermv (syntax, context))) ;
1986
1982
}
1987
1983
1988
1984
catch (...)
0 commit comments