making error handling context sensitive

also fixed a allocation size bug in strtab.c