raise explicit error when length of value is too large (fix #54)