This is pretty limited; if you get multiple errors in one batch
of probes it'll only return the last one to get sent back (ENOENT is
excluded). But it's better than nothing.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
}
// TODO: handle this error.
- assert(r == 0);
+ if (r != 0)
+ probe->err = r;
filer->_probed(probe, oid, size, mtime);
}
if (!probe->ops.empty())
return; // waiting for more!
+ if (probe->err) { // we hit an error, propagate back up
+ probe->onfinish->finish(probe->err);
+ delete probe->onfinish;
+ delete probe;
+ }
+
// analyze!
uint64_t end = 0;