stopUser | R Documentation |
Declares an error to be of class userStop
, to distinguish between errors we programmed
into the system (e.g. "Unrecognized scientist") and errors R gives (e.g. "object not found")
stopUser(message)
stopUserWithTime(logFileName)
stopUserAndLogInvalidJSON(logName, logFileName, url, response, method = "GET",
postfields = NULL)
message |
The error message that the user should see |
Stops the function, and adds the class "userStop" and "userError" to the error object
All errors intended for users to view should be thrown using stopUser
. Any error
thrown using stop
will be treated as an internal error by the simple
experiment loader.
When using this function, it is important to give it a single string as an error message.
This means using paste. While stop("text ", variable, " text")
is okay syntax,
you will get an error if you try stopUser("text ", variable, " text")
. Use paste0
instead: stopUser(paste0("text ", variable, " text"))
(note that this syntax is also
perfectly acceptable inside stop
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.