set errors in a real function

requires explicit description-setting, but more robust
include missing <stdint.h>