Skip to content

Commit 9dd95f6

Browse files
author
Metin Yazici
authored
Fix debug mode warning output display (#220)
1 parent 946f7af commit 9dd95f6

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [0.7.1] - 2020-07-30
6+
### Fixed
7+
- A minor bug in debug mode that the user-defined error messages weren't displayed as warning messages. [#220](https://github.com/plotly/dashR/pull/220).
8+
59
## [0.7.0] - 2020-07-28
610
### Added
711
- Dash for R now supports an `update_title` parameter, as in Dash for Python. [#218](https://github.com/plotly/dashR/pull/218)

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dash
22
Title: An Interface to the Dash Ecosystem for Authoring Reactive Web Applications
3-
Version: 0.7.0
3+
Version: 0.7.1
44
Authors@R: c(person("Chris", "Parmer", role = c("aut"), email = "[email protected]"), person("Ryan Patrick", "Kyle", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5829-9867"), email = "[email protected]"), person("Carson", "Sievert", role = c("aut"), comment = c(ORCID = "0000-0002-4958-2844")), person("Hammad", "Khan", role = c("aut"), email = "[email protected]"), person(family = "Plotly Technologies", role = "cph"))
55
Description: A framework for building analytical web applications, Dash offers a pleasant and productive development experience. No JavaScript required.
66
Depends:

R/utils.R

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ stackTraceToHTML <- function(call_stack,
747747
# stack will be "pruned" of error handling functions
748748
# for greater readability.
749749
getStackTrace <- function(expr, debug = FALSE, prune_errors = TRUE) {
750-
if(debug) {
750+
if (debug) {
751751
tryCatch(withCallingHandlers(
752752
expr,
753753
error = function(e) {
@@ -813,22 +813,18 @@ getStackTrace <- function(expr, debug = FALSE, prune_errors = TRUE) {
813813
} else if (currentCall[[1]] == "stop") {
814814
# handle case where function developer deliberately invokes a stop
815815
# condition and halts function execution
816-
identical(deparse(errorCall), deparse(currentCall))
817-
}
818-
else {
816+
TRUE
817+
} else {
819818
FALSE
820819
}
821-
822-
}
823-
)
824-
)
820+
}))
825821
# the position to stop at is one less than the difference
826822
# between the total number of calls and the index of the
827823
# call throwing the error
828824
stopIndex <- length(calls) - indexFromLast + 1
829825

830826
startIndex <- match(TRUE, lapply(functionsAsList, function(fn) fn == "getStackTrace"))
831-
functionsAsList <- functionsAsList[startIndex:stopIndex]
827+
functionsAsList <- functionsAsList[seq(startIndex, stopIndex)]
832828
functionsAsList <- removeHandlers(functionsAsList)
833829
}
834830

0 commit comments

Comments
 (0)