- return talloc_asprintf(m, "Creating temporary file %s: %s",
- f->fullname, strerror(errno));
+ return tal_fmt(m, "Creating temporary file %s: %s",
+ f->fullname, strerror(errno));
+
+ /* Add #line to demark where we are from, so errors are correct! */
+ linemarker = tal_fmt(f, "#line %i \"%s\"\n",
+ example->srcline+2, source->fullname);
+ if (write(fd, linemarker, strlen(linemarker)) != (int)strlen(linemarker)) {
+ close(fd);
+ return cast_const(char *, "Failure writing to temporary file");
+ }