File tree Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Expand file tree Collapse file tree 1 file changed +4
-17
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,8 @@ pub fn geterrmessage() -> String {
188
188
}
189
189
}
190
190
191
+ // TODO: Reimplement around `r_safe_eval()` to gain backtraces
192
+
191
193
/// Wrappers around R_tryCatch()
192
194
///
193
195
/// Takes a single closure that returns either a SEXP or `()`. If an R error is
@@ -331,25 +333,10 @@ pub unsafe fn r_try_catch<F, R>(fun: F) -> Result<RObject>
331
333
where
332
334
F : FnMut ( ) -> R ,
333
335
RObject : From < R > ,
334
- {
335
- let out = r_try_catch_any ( fun) ;
336
- out. map ( |x| RObject :: from ( x) )
337
- }
338
-
339
- pub unsafe fn r_try_catch_any < F , R > ( fun : F ) -> Result < R >
340
- where
341
- F : FnMut ( ) -> R ,
342
336
{
343
337
let vector = CharacterVector :: create ( [ "error" ] ) ;
344
- r_try_catch_finally ( fun, vector, || { } )
345
- }
346
-
347
- pub unsafe fn r_try_catch_classes < F , R , S > ( fun : F , classes : S ) -> Result < R >
348
- where
349
- F : FnMut ( ) -> R ,
350
- S : Into < CharacterVector > ,
351
- {
352
- r_try_catch_finally ( fun, classes, || { } )
338
+ let out = r_try_catch_finally ( fun, vector, || { } ) ;
339
+ out. map ( |x| RObject :: from ( x) )
353
340
}
354
341
355
342
/// Run closure inside top-level context
You can’t perform that action at this time.
0 commit comments