search for: conditionmessag

Displaying 20 results from an estimated 82 matches for "conditionmessag".

Did you mean: conditionmessage
2017 Dec 01
3
tryCatch in on.exit()
...he on.exit has already been dealt with? Currently the outer tryCatch gets the error from the on.exit expression. xx <- function() { on.exit(tryCatch( expr = stop("error in xx's on.exit"), error=function(e) { cat("xx's on.exit caught error: <<", conditionMessage(e), ">>\n", sep="") })) stop("error in body of xx") } zz <- tryCatch(xx(), error=function(e)paste("outer tryCatch caught error <<", conditionMessage(e), ">>", sep="")) #xx's on.exit caught error: <<err...
2009 Jan 07
1
Compiling R for Solaris 10 Intel
...ction(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1]], quote(doTryCatch))) call <- sys.call(-4) dcall <- deparse(call)[1] prefix <- paste("Error in", dcall, ": ") LONG <- 75 msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1]] if (14 + nchar(dcall, type = "w") + nchar(sm[1], type = "w") > LONG) prefix <- paste(prefix, "\n ", sep = "") } else prefix <- "Error : " msg &l...
2012 May 15
1
KEGGSOAP installation error
...n(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w...
2006 Jun 25
1
using withCallingHandlers, how to deal with warning( , immediate. = TRUE)?
...ting of warnings: > options(warning.expression = NULL) > options(warning.expression = expression()) # Disable normal warnings > withCallingHandlers(for (i in 1:3) {print(i); + warning("test", immediate. = (i < 2))}, + warning = function(w) + cat("Warning:", conditionMessage(w), "\n")) [1] 1 Warning: test [1] 2 Warning: test [1] 3 Warning: test > options(warning.expression = NULL) It gets a little bit more complex to delay handling of warning messages, but basically, I manage it that way: > options(warning.expression = NULL) > options(warning....
2018 Sep 19
5
segfault issue with parallel::mclapply and download.file() on Mac OS X
...call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75LTraceback: sm <- strsplit(conditionMessage(e), "\n")[[1L]] 1: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) download.file(paste0(url_base, s), s) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")...
2013 Jun 07
1
cannot load pbdMPI package after compilation
...n(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w...
2011 Dec 15
1
error starting R-devel with --arch ppc -- "an unusual circumstance has arisen"
When I try and start R-devel as follows: R --vanilla --arch ppc I see this, over and over again, ^C does not interrupt it and I have to close the terminal window: > Error in paste0(prefix, conditionMessage(e), "\n") : not a BUILTIN function In addition: Warning message: An unusual circumstance has arisen in the nesting of readline input. Please report using bug.report() > Error in paste0(prefix, conditionMessage(e), "\n") : not a BUILTIN function In addition: Warning messa...
2010 Nov 09
1
R-2.12.0 problem on Solaris 10
...n(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w...
2011 Jan 27
0
Problems installing gputools
...arentenv, handlers) 7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste(prefix, "\n ", s...
2010 Feb 08
2
Error on start R in server
...n(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w...
2019 Jun 21
2
Suggested Patch: Library returns matching installed packages when typo present
...n error and a warning but as far as I understand it, library()'s main/intended use is interactive and there are other functions available for programmatic use cases. Now that library() signals a structured error there are other options. One possibility, at least as an interim, is to define a conditionMessage method, e.g. as conditionMessage.packageNotFoundError <- function(c) { lib.loc <- c$lib.loc msg <- c$message package <- c$package if(length(lib.loc)) { allpkgs <- .packages(TRUE, lib.loc) if (!is.na(w <- match(tolower(package), tolower(allpk...
2012 Feb 06
1
Segfault on ".C" registration via R_CMethodDef according to 'Writing R Extensions'.
...n(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w...
2010 Nov 16
2
Debugging segfault in foreach
...cat("result of evaluating expression\ :\n") print(r) } tryCatch(accumulator(list(r), i), error = function(e) { cat("error calling combine function:\n") print(e) NULL }) \ i <- i + 1 }}, error = function(e) { if (!identical(conditionMessage(e), "StopIteration")) stop(simpleError(conditionMessage(e), expr))}) 10: doSEQ(obj, substitute(ex), parent.frame()) 11: foreach(chr = chrs, .packages = "GenomicFeaturesX", .verbose = TRUE) %do% { .gc <- duplicate(gcache, pre.load = NULL) on.exit(dispose(.gc))...
2018 Oct 04
0
segfault issue with parallel::mclapply and download.file() on Mac OS X
...if > (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) > call <- sys.call(-4L) dcall <- deparse(call)[1L] > prefix <- paste("Error in", dcall, ": ") > LONG <- 75LTraceback: > sm <- strsplit(conditionMessage(e), "\n")[[1L]] 1: w <- 14L > + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) > download.file(paste0(url_base, s), s) w <- 14L + nchar(dcall, > type = "b") + nchar(sm[1L], > ty...
2009 Dec 30
1
seg-fault... but on what
...function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] if (14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") > LONG) prefix <- paste(prefix, "\n ", sep = "") } else prefix <- "Error : " msg...
2019 Jun 21
2
Suggested Patch: Library returns matching installed packages when typo present
Dear R-core devs, I hope this email finds you well. Please see the proposed patch to R-devel below: Scenario: When loading a package using `library`, a package may not be found if the cases are not matching: ``` > library(ORG.Hs.eg.db) Error in library(ORG.Hs.eg.db) : there is no package called 'ORG.Hs.eg.db' ``` Suggested Patch: Returns a message matching what
2018 Sep 20
0
segfault issue with parallel::mclapply and download.file() on Mac OS X
...e) if > (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) > call <- sys.call(-4L) dcall <- deparse(call)[1L] > prefix <- paste("Error in", dcall, ": ") > LONG <- 75LTraceback: > sm <- strsplit(conditionMessage(e), "\n")[[1L]] 1: w <- 14L > + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) > download.file(paste0(url_base, s), s) w <- 14L + nchar(dcall, > type = "b") + nchar(sm[1L], > typ...
2010 Oct 10
1
segfault caused by `icfit` in `interval` package
...function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w...
2010 Mar 25
1
*** caught segfault *** address 0x18, cause 'memory not mapped'
...or = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1]], quote(doTryCatch))) call <- sys.call(-4) dcall <- deparse(call)[1] prefix <- paste("Error in", dcall, ": ") LONG <- 75 msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1]] if (14 + nchar(dcall, type = "w") + nchar(sm[1], type = "w") > LONG) prefix <- paste(prefix, "\n ", sep = "") } else prefix <- "Error : " msg <-...
2008 Feb 14
1
{lattice/grid} "Error using packet 1" and traceback
On some errors during the plot of a lattice/grid graphics, there is written a message like "Error using packet 1: missing value where TRUE/FALSE needed" into the concering panel and the next panel is plotted. Which option I could use to stop the execution to have a look at the error by a traceback? Regards - Wolfram