dot-stop: Customized stop() function

Description Usage Arguments Details Note Examples

Description

Customized stop() function

Usage

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

Arguments

code

character; Error code.

info

character; Addidional information used in some error codes.

msg

character;

Details

List of error codes:

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

Note

Internal function only for convenience

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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 July 14, 2021, 6:33 p.m.