Skip to content

Commit 1280243

Browse files
run() called twice did not produce a FutureError, just an regular error [ci skip]
1 parent 38bce57 commit 1280243

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

NEWS

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
Package: future.batchtools
22
==========================
33

4-
Version: 0.9.0-9000 [2020-10-02]
4+
Version: 0.9.0-9000 [2020-10-13]
55

66
DOCUMENTATION:
77

88
* Document option 'future.delete' and clarify option 'future.cache.path'
99
in help("future.batchtools.options").
10-
10+
11+
BUG FIXES:
12+
13+
* If run() was called twice for a BatchtoolsFuture, it would not produce
14+
a FutureError but only a regular non-classed error.
15+
1116

1217
Version: 0.9.0 [2020-04-14]
1318

R/BatchtoolsFuture-class.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ run.BatchtoolsFuture <- function(future, ...) {
367367
if (future$state != "created") {
368368
label <- future$label
369369
if (is.null(label)) label <- "<none>"
370-
stop(sprintf("A future ('%s') can only be launched once.", label))
370+
msg <- sprintf("A future ('%s') can only be launched once.", label)
371+
stop(FutureError(msg, future = future))
371372
}
372373

373374
## Assert that the process that created the future is

0 commit comments

Comments
 (0)