add primitive error management