Skip to content

Commit

Permalink
Split only on first colon in error display.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertzk committed Jan 31, 2018
1 parent 1c2967b commit 96f5cb8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: bettertrace
Type: Package
Title: bettertrace (http://github.com/robertzk/bettertrace)
Description: A better stack trace for R.
Version: 0.1.2
Version: 0.1.3
Author: Robert Krzyzanowski <technoguyrob@gmail.com>
Maintainer: Robert Krzyzanowski <technoguyrob@gmail.com>
Authors@R: c(person("Robert", "Krzyzanowski",
Expand Down
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Version 0.1.3

* Fix error message filtering so that it does not remove "foo"
in "error: foo: bar"

# Version 0.1.2

* Environments with a `stacktrace_label` attribute display a custom
Expand Down
2 changes: 1 addition & 1 deletion R/stacktrace.R
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ trim_call <- function(pre_call_text) {
}

sanitize_message <- function(msg) {
gsub("^Error.*: ", "", as.character(msg))
gsub("^Error[^:]*: ", "", as.character(msg))
}

strip_hidden <- function(trace) {
Expand Down

0 comments on commit 96f5cb8

Please sign in to comment.