File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ pub enum Error {
2323 message : String ,
2424 } ,
2525 TryCatchError {
26- code : Option < String > ,
26+ call : Option < String > ,
2727 message : String ,
2828 class : Option < Vec < String > > ,
2929 r_trace : String ,
@@ -98,14 +98,14 @@ impl fmt::Display for Error {
9898 } ,
9999
100100 Error :: TryCatchError {
101- code ,
101+ call ,
102102 message,
103103 r_trace,
104104 rust_trace,
105105 ..
106106 } => {
107- if let Some ( code ) = code {
108- let code = truncate_lines ( code . to_owned ( ) , 50 ) ;
107+ if let Some ( call ) = call {
108+ let code = truncate_lines ( call . to_owned ( ) , 50 ) ;
109109 write ! ( f, "Error evaluating '{code}': {message}" ) ?;
110110 } else {
111111 write ! ( f, "{message}" ) ?;
Original file line number Diff line number Diff line change @@ -95,8 +95,8 @@ impl RFunction {
9595pub fn try_eval ( expr : SEXP , env : SEXP ) -> crate :: Result < RObject > {
9696 let mut res = try_catch ( || unsafe { Rf_eval ( expr, env) } ) . map ( RObject :: from) ;
9797
98- if let Err ( Error :: TryCatchError { ref mut code , .. } ) = res {
99- * code = Some ( unsafe { r_stringify ( expr, "\n " ) ? } ) ;
98+ if let Err ( Error :: TryCatchError { ref mut call , .. } ) = res {
99+ * call = Some ( unsafe { r_stringify ( expr, "\n " ) ? } ) ;
100100 }
101101
102102 res
@@ -237,7 +237,7 @@ where
237237 let rust_trace = std:: backtrace:: Backtrace :: force_capture ( ) ;
238238
239239 * ( data. res ) = Some ( Err ( Error :: TryCatchError {
240- code : call,
240+ call,
241241 message,
242242 class,
243243 r_trace,
You can’t perform that action at this time.
0 commit comments