Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ All changes included in 1.9:
## Regression fixes

- ([#13396](https://github.com/quarto-dev/quarto-cli/issues/13396)): Fix `quarto publish connect` regression.
- ([#13441](https://github.com/quarto-dev/quarto-cli/pull/13441)): Catch `undefined` exceptions in Pandoc failure to avoid spurious error message.

## Dependencies

Expand Down
14 changes: 8 additions & 6 deletions src/command/render/render-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,13 @@ export async function renderFiles(
return await pandocRenderer.onComplete(false, options.flags?.quiet);
} catch (error) {
if (!(error instanceof Error)) {
warn("Should not have arrived here:", error);
throw error;
warn(`Error encountered when rendering files`);
}
return {
files: (await pandocRenderer.onComplete(true)).files,
error: error || new Error(),
error: error instanceof Error
? error
: new Error(error ? String(error) : undefined),
};
} finally {
tempContext.cleanup();
Expand Down Expand Up @@ -409,12 +410,13 @@ export async function renderFile(
return await pandocRenderer.onComplete(false, options.flags?.quiet);
} catch (error) {
if (!(error instanceof Error)) {
warn("Should not have arrived here:", error);
throw error;
warn(`Error encountered when rendering ${file.path}`);
}
return {
files: (await pandocRenderer.onComplete(true)).files,
error: error || new Error(),
error: error instanceof Error
? error
: new Error(error ? String(error) : undefined),
};
} finally {
if (Deno.env.get("QUARTO_PROFILER_OUTPUT")) {
Expand Down
Loading