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
2 changes: 1 addition & 1 deletion src/evaluation/MacroAnalysis.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function resolve_topology(
sn = (session, notebook)

function macroexpand_cell(cell)
try_macroexpand(module_name::Symbol=Symbol("")) = begin
function try_macroexpand(module_name::Symbol=Symbol(""))
success, result = macroexpand_in_workspace(sn, unresolved_topology.codes[cell].parsedcode, cell.cell_id, module_name)
if success
Success(result)
Expand Down
6 changes: 4 additions & 2 deletions src/evaluation/WorkspaceManager.jl
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,10 @@ function macroexpand_in_workspace(session_notebook::SN, macrocall, cell_id, modu
# We have to be careful here, for example a thrown `MethodError()` will contain the called method and arguments.
# which normally would be very useful for debugging, but we can't serialize it!
# So we make sure we only serialize the exception we know about, and string-ify the others.
if (error isa LoadError && error.error isa UndefVarError) || error isa UndefVarError
(false, error)
if error isa UndefVarError
(false, UndefVarError(error.var))
elseif error isa LoadError && error.error isa UndefVarError
(false, UndefVarError(error.error.var))
else
(false, ErrorException(sprint(showerror, error)))
end
Expand Down