tmf: Make StateValueType and TimeRange exceptions into runtime ones
After much deliberating, here's a suggestion to make
StateValueTypeException and TimeRangeException subclasses of
RuntimeException instead.
The rationale is that it is possible to check for these in advance
(via ITmfStateValue.getType(), and ITmfStateSystem.getCurrentEndTime()).
If the caller does not do these checks correctly, he deserves getting
a runtime exception in the face.
In practice, somebody doing it correctly would always have to wrap it
in a redudant try/catch, saying "I checked for this, I know, throw new
IllegalStateException()", which kind of defeats the purpose of a
checked exception.
The existing code catching those exceptions will continue to work fine,
it remains possible to do so, but new code may decide to skip it.
Change-Id: I76210eef25a47d3f54c93d9e259c82fc99d80375
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/21489
Tested-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
This page took 0.0282 seconds and 5 git commands to generate.