AlgebraicJulia / Catlab.jl

A framework for applied category theory in the Julia language
https://www.algebraicjulia.org
MIT License
614 stars 58 forks source link

Unexpected error message when adding parts #728

Closed kris-brown closed 1 year ago

kris-brown commented 1 year ago
g = Graph 
add_part!(g, :V)

this is a user error (should have been Graph()) results in a StackOverflowError in contrast to things like rem_part! (which results in a method not found error). If there's any way to avoid this it would make things more user friendly!

epatters commented 1 year ago

This should be fixable by appropriately restricting the types of add_part(s)!.