Description Usage Arguments Value Functions See Also Examples
View source: R/DataExceptions.R
DataException
s and their sub-classes describe problems with data
values, names, or formats. Subclasses extended the specificity of the
DataException
. Each takes a data
argument and possibly others.
See Exception
. These exceptions are intended to be signaled,
i.e. with stop
and exist both to provide pre-defined error messages
and so that handlers in try/catch blocks have latitude to choose what
granularity of exception to catch.
1 2 3 4 5 6 7 8 9 10 11 | DataException(data = NA, message = "*", call = NULL,
package = packageName(), ...)
FileFormatException(path = NA, line = NA, data = NA, message = "*",
call = NULL, package = packageName(), ...)
EmptyFileException(path = NA, data = NA, line = NA, message = "*",
call = NULL, package = packageName(), ...)
FileNotEmptyException(path = NA, data = NA, line = NA, message = "*",
call = NULL, package = packageName(), ...)
|
data |
The data element associated with an exception. Format varies and
should be described in subclass documentation. This may be |
message |
The message associated with the exception, for reading by
humans. The default message is usually good enough, but can be overridden
through this parameter if needed. When constructed inside packages, the
message displayed will have the name of the package prepended as
|
call |
The call or call stack associated with the exception. By default
this is NUL. Can be overridden to provide the |
package |
The package where this exception is generated. May be
|
... |
Additional arguments defining |
path |
The path associated with an exception, as a one element character
vector This is required for a |
line |
The line associated with an exception, as a one element integer
vector This is required for a |
An DataException
or descendant describing some problematic
event involving a data values, names, or formats. Always is/extends
class c( "DataException", "Exception", "condition" )
.
DataException
: This exception and sub-classes are Exception
s that describe
problems with data values, names, or formats.
message: "[package] A DataException occurred.
"
class: c( "DataException", "Exception", "condition" )
data: Defaults: data = NA
.
FileFormatException
: This exception and sub-classes are Exception
s that describe
problems with data files
message: "[package] A FileFormatException occurred at
line line in file: "file". (Running in: "getwd()").
That line began: "first 80 char".
"
class: c( "FileFormatException", "DataException", "Exception",
"condition" )
data: Defaults: path = NA, line = NA, data = NA
.
EmptyFileException
: This exception indicates a data file was unexpectedly empty
message: [package] An EmptyFileException occurred. File is unexpectedly empty: "file". (Running in: "getwd()").
class: c( "EmptyFileException", "FileFormatException",
"DataException", "Exception", "condition" )
data: Defaults: path = NA, data= NA, line= NA
.
FileNotEmptyException
: This exception indicates a data file that should have been empty but wasn't.
message: [package] A FileNotEmptyException occurred. File was expectedly to be empty but wasn't: "file". (Running in: "getwd()").
class: c( "FileNotEmptyException", "FileFormatException",
"DataException", "Exception", "condition" )
data: Defaults: path = NA, data= NA, line= NA
.
condition
, conditionMessage()
, conditionCall
,
Exception
, exceptionPackage
, exceptionData
1 2 3 4 5 | dEx <- IOException()
conditionMessage(dEx)
conditionCall(dEx)
exceptionPackage(dEx)
exceptionData(dEx)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.