Skip to content

bad_numeric_cast exception: review code changes and spec #191

@mhier

Description

@mhier

Review the following commits:

They are somewhat contradicting the TransferElement spec C.4 (in particular 4.3) which still mentions the bad_numeric_cast exceptions. This part of the spec (and all other references to this exception) shall be reviewed as well. It should be decided which of the following solutions shall be implemented:

  • overflows always result in the closest possible value
  • asymmetric behaviour: in writes, overflows always result in the closest value, while for reading overflows are prevented in the constructor phase (logic_error if type is too small).

The second solution raises the question how to handle (as an extreme example) bidirectional variables between ApplicationModules involving a conversion (which is currently not implemented, but maybe it should be in future?).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions