esa / CCSDS_MO_StubGenerator

Generates technology bindings for CCSDS MAL service specifications
Other
4 stars 9 forks source link

Better exception handling #15

Closed CesarCoelho closed 7 years ago

CesarCoelho commented 8 years ago

Cesar: I have noticed that this error/question is very common with new people in MO. Basically it happens when you set an non-nullable field to null and then you try to encode it. Is it possible to get a better error message here? Something like "Internal error encoding message: The field xyz of the composite abc cannot be null according to the services specification" would be nice.

Sam's answer: I think the best place to catch this is in the generated structures as they are the only places that know all the information (such as structure name and field name). I don't think there is anything on the Java MAL API for trapping this, so maybe add a RID on that and we can implement it in the Stub Generator.

SamCooper commented 7 years ago

Done