similar to: signalCondition

Displaying 20 results from an estimated 2000 matches similar to: "signalCondition"

2007 Feb 19
2
"try"ing to understand condition handling
I'm confused by the page documenting tryCatch and friends. I think it describes 3 separate mechanisms: tryCatch (in which control returns to the invoking tryCatch), withCallHandlers (in which control goes up to the calling handler/s but then continues from the point at which signalCondition() was invoked), and withRestarts (I can't tell where control ends up). For tryCatch the docs say
2012 Feb 29
0
Alternative to .Internal(.dfltStop(msg, call))?
Hi, I'm looking for a way to generate a "full stop" that will not be caught by signal handlers, cf. .Internal(.dfltStop(msg, call)). RATIONALE: In the R.oo package I have throw() which (leaving out some details) basically does what stop() does but appends a stack trace string to the error message that shows up at the R prompt. Example: bar <- function() throw("A foo
2009 Apr 14
0
top level condition handlers
Hello, I would like to establish top level condition handlers and restarts, so that I don't explicit calls to withCallingHandlers and withRestarts in many places: For example : > customError function( message ){ err <- simpleError( message ) class( err ) <- c( "customError", class( err) ) err } > withCallingHandlers( { signalCondition(customError(
2018 Jul 28
4
re-throwing an interrupt condition
Anyone knows a way to re-throw a caught interrupt condition, so that it behaves just like the original one? I.e. no error message is printed, but the execution is stopped of course. With just calling stop in the error handler, it prints the error message, or, if there is no error message (like in the original interrupt condition), another error happens. tryCatch(Sys.sleep(100), interrupt =
2017 Dec 01
3
tryCatch in on.exit()
The following example involves a function whose on.exit() expression both generates an error and catches the error. The body of the function also generates an error. When calling the function wrapped in a tryCatch, should that tryCatch's error function be given the error from the body of the function, since the one from the on.exit has already been dealt with? Currently the outer tryCatch
2010 May 29
3
simpleError in storage.mode(y)
bonjour en travaillant avec un logiciel Multiple source methode, j'ai eu ce message d'erreur : simpleError in storage.mode(y) - "double": invalid to change the storage mode of a factor en recherchant sur le net , c'est un message universel svp, que signifiera ce message ? merci pour votre int?r?t anzid -- View this message in context:
2015 Sep 10
2
Using IDs to suppress specific messages and warnings
The suppressMessages and suppressWarnings functions currently suppress all the message or warnings that are generated by the input expression. The ability to suppress only specific messages or warnings is sometimes useful, particularly for cases like file import where there are lots of things that can go wrong. Suppressing only messages that match a regular expression has rightly been rejected
2020 Jun 25
1
Unexpected Error Handling by Generic in R 4.0.1
Hello R-devel community, I posted a new R 4.0.1 behaviour to stack overflow (https://stackoverflow.com/questions/62327810/inconsistent-error-handling-of-function-and-s4-generics-on-r-4-0-1), where I think it is an undesired or unexpected change in 4.0.1. Attributes of errors seem to be lost or obscured when encountered in an S4 generic context. An example of this being undesirable comes in shiny
2005 May 10
1
wish: print.condition and html (PR#7848)
Full_Name: Tom Short Version: 2.1.0 OS: Win2000 Submission from: (NULL) (68.236.159.160) print.condition prints out error messages enclosed in angle brackets as in: > simpleError("Sigh, yet another error...") <simpleError: Sigh, yet another error...> If R is used to generate HTML output (R2HTML or Rpad), then the error messages get hidden because browsers will skip right
2007 Aug 27
0
Suggestion: Add simpleExit condition
Hi, I would like to bring up and old suggestion [http://tolstoy.newcastle.edu.au/R/devel/06/03/4512.html] of adding an exit condition, so that for instance it is possible to silently exit from scripts and Rd examples similar to return() for functions, e.g. \examples{ require("foo") || exit("Example will not run without the 'foo' package.") ... } I know this can be
2023 Feb 19
2
R: determine if `suppressMessages()` has been invoked
Awesome, this gets the job done. To answer your question: When using C or C++ via Rinside or within a package, those functions do not listen to suppressMessages, e.g. `Rprintf` keeps printing to the console. Since it's common to use wrapper functions in R anyway, they can run `are_messages_suppressed` and pass the information on to an explicit `verbose` argument of the C / C++ function.
2023 Nov 20
1
Calculating volume under polygons
Dear all; I am trying to calculate volume under each polygon of a shapefile according to a DEM. when I run the code, it gives me an error as follows. " Error in h(simpleError(msg, call)) : error in evaluating the argument 'x' in selecting a method for function 'addAttrToGeom': sp supports Z dimension only for POINT and MULTIPOINT. use `st_zm(...)` to coerce to XY dimensions
2019 Mar 02
1
stopifnot
A private reply by Martin made me realize that I was wrong about stopifnot(exprs=TRUE) . It actually works fine. I apologize. What I tried and was failed was stopifnot(exprs=T) . Error in exprs[[1]] : object of type 'symbol' is not subsettable The shortcut assert <- function(exprs) stopifnot(exprs = exprs) mentioned in "Warning" section of the documentation similarly fails
2019 Mar 31
3
stopifnot
Ah, with R 3.5.0 or R 3.4.2, but not with R 3.3.1, 'eval' inside 'for' makes compiled version behave like non-compiled version. options(error = expression(NULL)) library(compiler) enableJIT(0) f <- function(x) for (i in 1) {x; eval(expression(i))} f(is.numeric(y)) # Error: object 'y' not found fc <- cmpfun(f) fc(is.numeric(y)) # Error: object 'y' not found
2019 Mar 05
2
stopifnot
Another possible shortcut definition: assert <- function(exprs) do.call("stopifnot", list(exprs = substitute(exprs), local = parent.frame())) After thinking again, I propose to use ??? ? ? stop(simpleError(msg, call = if(p <- sys.parent()) sys.call(p))) - It seems that the call is the call of the frame where stopifnot(...) is evaluated. Because that is the correct context, I
2017 Nov 01
2
R-3.4.2: make check stops at line 698 of tests/reg-tests-1d.R
Dear Duncan, Many thanks! Am Mi, 1. Nov 2017, um 16:17, schrieb Duncan Murdoch: > On 01/11/2017 8:11 AM, Albrecht Kauffmann wrote: > > Hi all, > > > > after compiling R-3.4.2 on opensuse leap 42.3, make check failed. Until > > R-3.4.1 I never had a problem with these tests. No, the programm stops > > at the following line of tests/reg-tests-1d.R: > > >
2004 Mar 11
2
No traceback available when using try(...)
Hello, 1. The Situation : ------------------------ The stack traceback is not available when error ouccured in a try(....) -- test.R -------------------------------- f<-function(a){ return ( log(a) ) } try(f("A")) traceback() ------------------------------------------- I get the following message : > try(f("A")) Error in log(x) : Non-numeric argument to mathematical
2009 Sep 02
1
Tracebacks & try
Hi all, The help for traceback states: Errors which are caught _via_ 'try' or 'tryCatch' do not generate a traceback, so what is printed is the call sequence for the last uncaught error, and not necessarily for the last error. Is there any way to get a traceback (or something similar) for an error raised inside a try block? Regards, Hadley -- http://had.co.nz/
2017 Nov 01
0
R-3.4.2: make check stops at line 698 of tests/reg-tests-1d.R
On 01/11/2017 12:02 PM, Albrecht Kauffmann wrote: > Dear Duncan, > > Many thanks! > > Am Mi, 1. Nov 2017, um 16:17, schrieb Duncan Murdoch: >> On 01/11/2017 8:11 AM, Albrecht Kauffmann wrote: >>> Hi all, >>> >>> after compiling R-3.4.2 on opensuse leap 42.3, make check failed. Until >>> R-3.4.1 I never had a problem with these tests. No,
2017 Nov 01
2
R-3.4.2: make check stops at line 698 of tests/reg-tests-1d.R
Hi all, after compiling R-3.4.2 on opensuse leap 42.3, make check failed. Until R-3.4.1 I never had a problem with these tests. No, the programm stops at the following line of tests/reg-tests-1d.R: > ## available.packages() (not) caching in case of errors > tools::assertWarning(ap1 <- available.packages(repos = "http://foo.bar")) > tools::assertWarning(ap2 <-