Skip to content

Overflow exception and DivideByZero exception from the RangeAttribute #472

@pvlakshm

Description

@pvlakshm

Specific data values fed to the RangeAttribute can trigger a DivideByZero exception and/or an OverflowException. These values have been pointed out by the Smart Unit Tests feature from Visual Studio 2015, and an image with the data values is attached.

The DivideByZero may happen by the user entering 0 as a step value.
The OverflowException is more serious as it highlights an implicit constraint saying “to > from” that is not stated anywhere. There should there be any need for that.
exceptions.

These issues are seen for all the RangeAttribute overloads.
Please let me know if you need any further information.

Pratap Lakshman

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions