return error code if compilation error occurs