allocate keys to errors and warnings