Error handling
Gather possible errors in a ragconnect specification:
ReceiveTokenEndpointDefinition
- the token must be resolvable within the parent type
- the Token must not be a TokenNTA (i.e., check for
!Token.getNTA()
) - type of first mapping must be
byte[]
- type of last mapping must be type of the Token
- types of mappings must match (modulo inheritance)
- for all type checks, there are three cases regarding the two types to check against:
-
- both are nonterminal types, check with grammar
-
- both are known classes, check with
Class.forName()
and subclass-checking-methods
- both are known classes, check with
-
- otherwise issue warning, that types could not be matched
-
SendTokenEndpointDefinition
- Token must be a TokenNTA (i.e., check for
Token.getNTA()
) - type of first mapping must be type of Token
- type of last mapping must be
byte[]
- types of mappings must match (modulo inheritance)
- for all type checks, there are three cases regarding the two types to check against:
-
- both are nonterminal types, check with grammar
-
- both are known classes, check with
Class.forName()
and subclass-checking-methods
- both are known classes, check with
-
- otherwise issue warning, that types could not be matched
-
- no more than one write mapping for each TokenComponent
DependencyDefinition
- There must not be a write update definition for the source token
- This would create conflicting setter
- rschoene [time=May 6th, 2020] This could actually be wrong, as write definition do not create a setter
- There must be a write update definition for the target token
- Otherwise there are missing update and write methods used in the virtual setter