Update error.c

add some cases for float and string reading error.