Fix: add error class to header if compile failed