Skip to content

Commit 7caf69f

Browse files
nsicchaclaude
andcommitted
Add Base.show for StanBlocksError to fix VS Code error display
VS Code's Julia extension uses show() not showerror() for error rendering, causing raw struct dumps with Ptr{Nothing} pointers. Delegate to showerror. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 359dcfc commit 7caf69f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/StanBlocks.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ function _expr_trace(frames)
126126
trace
127127
end
128128

129+
Base.show(io::IO, e::StanBlocksError) = showerror(io, e)
130+
129131
function _showerror_header(io::IO, e::StanBlocksError)
130132
print(io, "StanBlocksError [$(e.phase)]: $(e.context)\n")
131133
print(io, " Caused by: ")

0 commit comments

Comments
 (0)