Skip to content

Commit 7d5afe3

Browse files
committed
better error messages
1 parent 3a02305 commit 7d5afe3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/buchheim.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,14 +281,14 @@ function assert_rooted_tree(adj_list::AbstractVector{<:AbstractVector})
281281
if visited[child] == false
282282
visited[child] = true
283283
else # node was visited before
284-
throw(ArgumentError("Pathes not unique ($child has multiple parent nodes)!"))
284+
throw(ArgumentError("Buchheim assumption broken, this is not a rooted tree: Node $child has multiple parent nodes!"))
285285
end
286286
end
287287
end
288288
if visited[1] !== false
289-
throw(ArgumentError("Node 1 needs to be the root!"))
289+
throw(ArgumentError("Buchheim assumption broken, this is not a rooted tree: Node 1 needs to be the root!"))
290290
end
291291
if !all(view(visited, 2:lastindex(visited)))
292-
throw(ArgumentError("Some nodes are not part of the tree."))
292+
throw(ArgumentError("Buchheim assumption broken, this is not a rooted tree: Some nodes are not part of the tree."))
293293
end
294294
end

0 commit comments

Comments
 (0)