function dumpError(
  err,
  vol,
  { lavamoatPolicy, endoPolicy, log = fallbackLog.error.bind(fallbackLog) } = {}
) {
  log()
  log(util.inspect(err, { depth: null }))
  if (endoPolicy) {
    log('Endo policy:')
    log(util.inspect(endoPolicy, { depth: null }))
  }
  if (lavamoatPolicy) {
    log('Lavamoat policy:')
    log(util.inspect(lavamoatPolicy, { depth: null }))
  }
  log('Filesystem:')
  log(vol.toTree())
  log()
}
Dumps a bunch of information about an error and the virtual FS volume.
Optionally, policies

@param {unknown} err
@param {Volume} vol
@param {object} options
@param {LavaMoatPolicy} [options.lavamoatPolicy]
@param {LavaMoatEndoPolicy} [options.endoPolicy]
@param {(...args: any) => void} [options.log]