Skip to content

Commit 08f7808

Browse files
claude: Fix stack trace shown for Typst compilation errors
Use ErrorEx with printStack=false so users see only the Typst error message without a confusing internal stack trace. Fixes #13942 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent bd49015 commit 08f7808

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/command/render/output-typst.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import {
2727
kVariant,
2828
} from "../../config/constants.ts";
2929
import { error, warning } from "../../deno_ral/log.ts";
30+
import { ErrorEx } from "../../core/lib/error.ts";
3031
import { Format } from "../../config/types.ts";
3132
import { writeFileToStdout } from "../../core/console.ts";
3233
import { dirAndStem, expandPath } from "../../core/path.ts";
@@ -161,11 +162,10 @@ export function typstPdfOutputRecipe(
161162
typstOptions,
162163
);
163164
if (!result.success) {
164-
// Log the error so test framework can detect it via shouldError
165165
if (result.stderr) {
166166
error(result.stderr);
167167
}
168-
throw new Error("Typst compilation failed");
168+
throw new ErrorEx("Error", "Typst compilation failed", false, false);
169169
}
170170

171171
// Validate PDF against specified standards using verapdf (if available)

0 commit comments

Comments
 (0)