% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{safe_file_write}
\alias{safe_file_write}
\title{Wrap a file-writing expression with informative error handling}
\usage{
safe_file_write(expr, path, call = rlang::caller_env())
}
\arguments{
\item{expr}{An expression that writes a file.}

\item{path}{Character scalar. The file path being written to.}

\item{call}{The calling environment for error reporting.}
}
\value{
The result of \code{expr}, invisibly.
}
\description{
Catches errors from file-writing operations and re-throws with
actionable diagnostics (permissions, long OneDrive/SharePoint paths, etc.).
}
\keyword{internal}
