improve error messages
- treat validation errors of the result of write_ and read_ messages properly - add info about the called read_* and write_ methods to the error message, in case the error is not raised in the outmost method - as subsequent errors in poll functions are logged only once, log an info when a poll function succeeds again - remove DiscouragedConversion error Change-Id: Ib66e001cc95de8225751a1464a92594c369ceb3f Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/30788 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
@ -26,7 +26,7 @@
|
||||
import pytest
|
||||
|
||||
from frappy.datatypes import ArrayOf, BLOBType, BoolType, CommandType, \
|
||||
ConfigError, DataType, DiscouragedConversion, EnumType, FloatRange, \
|
||||
ConfigError, DataType, EnumType, FloatRange, \
|
||||
IntRange, ProgrammingError, ScaledInteger, StatusType, StringType, \
|
||||
StructOf, TextType, TupleOf, ValueType, get_datatype
|
||||
from frappy.errors import BadValueError, RangeError, WrongTypeError
|
||||
@ -702,7 +702,7 @@ def test_lazy_validation(dt):
|
||||
generalConfig.defaults['lazy_number_validation'] = True
|
||||
dt('0')
|
||||
generalConfig.defaults['lazy_number_validation'] = False
|
||||
with pytest.raises(DiscouragedConversion):
|
||||
with pytest.raises(WrongTypeError):
|
||||
dt('0')
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user