Skip to content

Add error handling for result display#2876

Open
asinghvi17 wants to merge 4 commits into
masterfrom
asinghvi17-patch-1
Open

Add error handling for result display#2876
asinghvi17 wants to merge 4 commits into
masterfrom
asinghvi17-patch-1

Conversation

@asinghvi17
Copy link
Copy Markdown
Collaborator

Handle errors that happen when a result gets displayed in an example block (via display_dict).

This often crops up when trying to latexify things, and the idea is that it should cause an error but not crash the doc build. I'm not sure how you are supposed to log the error such that warnonly specifiers will catch it, though, so some help there would be great.

asinghvi17 and others added 2 commits February 10, 2026 18:31
Handle errors that happen when a result gets displayed in an example block (via `display_dict`).

This often crops up when trying to latexify things, and the idea is that it should cause an error but not crash the doc build.  I'm not sure how you are supposed to log the error such that `warnonly` specifiers will catch it, though, so some help there would be great.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@asinghvi17
Copy link
Copy Markdown
Collaborator Author

Looks like CI errors were only on nightly (maybe due to Markdown stdlib changes)

@asinghvi17 asinghvi17 requested a review from mortenpi February 11, 2026 13:51
@fingolfin
Copy link
Copy Markdown
Collaborator

Do you have any example that reproduces the error, which could be used as basis for a test case?

@fingolfin
Copy link
Copy Markdown
Collaborator

This seems very similar to issue #1631

@mortenpi
Copy link
Copy Markdown
Member

I feel that the right place for the error handling would actually be inside the for loop in display_dict. Right now, this catch-all catch is a bit too broad.

And I guess the second question is whether we want the Documenter build succeed still if we hit this or fail? I'd always lean towards the latter, even if it is due to a buggy show method. But then we should probably push this into the usual error list and potentially allow the user to opt out of crashing with warnonly?

Comment thread src/expander_pipeline.jl Outdated
@mortenpi mortenpi added the Status: Waiting for Author The issue or pull request needs some action by its author label Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Waiting for Author The issue or pull request needs some action by its author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants