Skip to content

Commit

Permalink
Update Errors.jl
Browse files Browse the repository at this point in the history
Co-Authored-By: Paul Berg <[email protected]>
  • Loading branch information
fonsp and Pangoraw committed Jan 16, 2024
1 parent 0ac0a83 commit f471e1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Errors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ function MultipleDefinitionsError(topology::NotebookTopology, cell::AbstractCell
)
end

const hint1 = "Combine all definitions into a single reactive cell using a `begin ... end` block."
const _hint1 = "Combine all definitions into a single reactive cell using a `begin ... end` block."

# TODO: handle case when cells are in cycle, but variables aren't
function showerror(io::IO, cre::CyclicReferenceError)
print(io, "Cyclic references among ")
println(io, join(cre.syms, ", ", " and "))
print(io, hint1)
print(io, _hint1)
end

function showerror(io::IO, mde::MultipleDefinitionsError)
print(io, "Multiple definitions for ")
println(io, join(mde.syms, ", ", " and "))
print(io, hint1) # TODO: hint about mutable globals
print(io, _hint1) # TODO: hint about mutable globals
end

0 comments on commit f471e1a

Please sign in to comment.