Skip to content

Commit 5f295a9

Browse files
BUG FIX: Only the last of multiple progression handlers registered was used [#73]
1 parent bb37243 commit 5f295a9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

NEWS

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
Package: progressr
22
==================
33

4-
Version: 0.4.0-9000 [2020-01-23]
4+
Version: 0.4.0-9000 [2020-04-06]
55

6-
* ...
6+
BUG FIXES:
7+
8+
* Only the last of multiple progression handlers registered was used.
79

810

911
Version: 0.4.0 [2020-01-22]

R/with_progress.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ with_progress <- function(expr, handlers = progressr::handlers(), cleanup = TRUE
139139
withRestarts({
140140
signalCondition(control_progression("reset"))
141141
}, muffleProgression = function(p) NULL)
142-
}, progression = handler)
142+
}, progression = calling_handler)
143143

144144
## Evaluate expression
145145
capture_conditions <- TRUE
@@ -149,7 +149,7 @@ with_progress <- function(expr, handlers = progressr::handlers(), cleanup = TRUE
149149
## Don't capture conditions that are produced by progression handlers
150150
capture_conditions <<- FALSE
151151
on.exit(capture_conditions <<- TRUE)
152-
handler(p)
152+
calling_handler(p)
153153
},
154154
condition = function(c) {
155155
if (!capture_conditions || inherits(c, c("progression", "error"))) return()

0 commit comments

Comments
 (0)