Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

RccViolationException

An RccViolationException indicates a violation of the R Coding Conventions (RCC)


Description

Package: R.oo
Class RccViolationException

Object
~~|
~~+--try-error
~~~~~~~|
~~~~~~~+--condition
~~~~~~~~~~~~|
~~~~~~~~~~~~+--error
~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~+--simpleError
~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~+--Exception
~~~~~~~~~~~~~~~~~~~~~~~~~~~|
~~~~~~~~~~~~~~~~~~~~~~~~~~~+--RccViolationException

Directly known subclasses:

public static class RccViolationException
extends Exception

An RccViolationException indicates a violation of the R Coding Conventions (RCC). It is generated by setConstructorS3() and setMethodS3(). It is not meant to be caught, but instead the source code that violates the RCC should be fixed. For more information about RCC, see references below.

Usage

RccViolationException(...)

Arguments

...

Any arguments accepted by the constructor of Exception, i.e. one or several character strings, which will be concatenated and contain informative message about why the RCC was violated.

Details

Since it is not possible to assert that the RCC is followed during the parsing of the source code, but first only when the source code is actually executed.

Fields and Methods

Methods:

as.character Gets a string representing of the RCC violation.
getRccUrl Static method to get a URL where the RCC can be found.

Methods inherited from Exception:
as.character, getCall, getCalls, getLastException, getMessage, getStackTrace, getWhen, print, printStackTrace, throw

Methods inherited from error:
as.character, throw

Methods inherited from condition:
abort, as.character, conditionCall, conditionMessage, print

Methods inherited from Object:
$, $<-, [[, [[<-, as.character, attach, attachLocally, clearCache, clearLookupCache, clone, detach, equals, extend, finalize, getEnvironment, getFieldModifier, getFieldModifiers, getFields, getInstantiationTime, getStaticInstance, hasField, hashCode, ll, load, names, objectSize, print, save

Author(s)

Henrik Bengtsson

See Also

See also try() and tryCatch(). For detailed information about exceptions see Exception. The R Coding Conventions (RCC) can be found at https://aroma-project.org/developers/RCC/.

Examples

## Not run: 
  setConstructorS3("myClass", function() { extends(Object(), .value=0) })
  setMethodS3("MyMethod", "myClass", function(this) { "Hullo!" })
 
## End(Not run)

R.oo

R Object-Oriented Programming with or without References

v1.24.0
LGPL (>= 2.1)
Authors
Henrik Bengtsson [aut, cre, cph]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.