dot-stop: Customized stop() function

.stopR Documentation

Customized stop() function

Description

Customized stop() function

Usage

.stop(code, info = NULL, msg = NULL)

Arguments

code

character; Error code.

info

character; Additional information used in some error codes.

msg

character;

Value

Does not have any return value, simply throws an error!

Details

List of error codes:

e404
THIS ERROR SHOULD NEVER HAPPEN!!!
ErrorCodeNotFound
##############################
## !!ERROR CODE NOT FOUND!! ##
##############################
requested error code: 
<info[1]>
graphNELEdgesRequired
RCX object requires edges to be converted to an graphNEL object!
idNonNeg
Provided IDs (<info[1]>) must be non-neagtive!
idNotNum
Provided IDs (<info[1]>) must be numeric!
idRefNotFound
Provided IDs of <info[1]> don't exist in <info[2]>
idRefNotPresent
<info[1]> not present as <info[2]>
igraphEdgesRequired
RCX object requires edges to be converted to an igraph object!
paramAllNull
At least one argument of <info[1]> must be set!
paramDifferentLength
Arguments must have the same length!
  <info[1]>
paramListAllWrongClass
Not all elements of the list <info[1]> are of class "<info[2]>"!
paramMissing
Missing arguments: <info[1]>
paramMissingRCX
RCX object is missing!
paramNa
Argument <info[1]> must not contain any NA values!
paramNonNeg
All elements of <info[1]> must be non-neagtive!
paramNotChar
All elements of <info[1]> must be characters!
paramNotList
Argument <info[1]> must be a list!
paramNotLog
All elements of <info[1]> must be logical!
paramNotNamed
Object <info[1]> must have names!
paramNotNum
All elements of <info[1]> must be numeric!
paramNotUnique
Elements of <info[1]> must not contain duplicates!
paramWrongValue
Argument <info[1]> only can take following values: <info[2]>
validationFail
Aspect (<info[1]>) failed validation!
Check if the aspect is valid: validate(<info[1]>)
wrongClass
Class of object <info[1]> is not "<info[2]>"!
wrongClassOf
Class of object <info[1]> is not one of <info[2]>!

Note

Internal function only for convenience

Examples

## Not run: 
.stop("paramMissingRCX")
#Error: .stop
#    RCX object is missing!

.stop("paramNotUnique","idParamName")
#Error: .stop
#    Provided IDs (idParamName) contain duplicates!

.stop("wrongClass",c("nodesAspect", "NodesAspect"))
#Error: .stop
#    Class of object "nodesAspect" is not "NodesAspect"!

## End(Not run)

frankkramer-lab/RCX documentation built on Feb. 4, 2023, 5:12 p.m.