Skip to content

Commit

Permalink
Fix crash with debug logging
Browse files Browse the repository at this point in the history
Fixes in Domain.jl
  • Loading branch information
sjdaines committed Jul 30, 2023
1 parent 8d4e318 commit 4851450
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Domain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ end
function _link_create(domain::Domain, @nospecialize(reaction::AbstractReaction),
variable::VariableReaction{VT_ReactProperty},
linkvar_domain::Domain, linkvar_name::AbstractString, dolog)
dolog && @debug "Creating Property $(reaction.base.domain.name).reactions.$(reaction.name).$(variable.name) "*
dolog && @debug "Creating Property $(reaction.base.domain.name).reactions.$(reaction.name).$(variable.localname) "*
"--> $(linkvar_domain.name).$(linkvar_name)"

if haskey(linkvar_domain.variables, linkvar_name)
Expand Down Expand Up @@ -386,7 +386,7 @@ end
function _link_create(domain::Domain, @nospecialize(reaction::AbstractReaction),
variable::VariableReaction{VT_ReactTarget},
linkvar_domain::Domain, linkvar_name::AbstractString, dolog)
dolog && @debug "Creating Target $(reaction.base.domain.name).reactions.$(reaction.name).$(variable.name) "*
dolog && @debug "Creating Target $(reaction.base.domain.name).reactions.$(reaction.name).$(variable.localname) "*
"--> $(linkvar_domain.name).$(linkvar_name)"

if haskey(linkvar_domain.variables, linkvar_name)
Expand Down Expand Up @@ -415,7 +415,7 @@ function _link_create_contrib(domain::Domain, @nospecialize(reaction::AbstractRe
if (!haskey(linkvar_domain.variables, linkvar_name)
&& !variable.link_optional)

dolog && @debug "Creating host Target for Contributor $(reaction.base.domain.name).reactions.$(reaction.name).$(variable.name) "*
dolog && @debug "Creating host Target for Contributor $(reaction.base.domain.name).reactions.$(reaction.name).$(variable.localname) "*
"--> $(linkvar_domain.name).$(linkvar_name)"

linkvar = create_VariableDomContribTarget(linkvar_domain, linkvar_name, variable)
Expand All @@ -437,7 +437,7 @@ function _link_create_dep(domain::Domain, @nospecialize(reaction::AbstractReacti
if (!haskey(linkvar_domain.variables, linkvar_name)
&& !variable.link_optional)

dolog && @debug "Creating host Property for Dependency $(reaction.base.domain.name).reactions.$(reaction.name).$(variable.name) "*
dolog && @debug "Creating host Property for Dependency $(reaction.base.domain.name).reactions.$(reaction.name).$(variable.localname) "*
"--> $(linkvar_domain.name).$(linkvar_name)"

linkvar = create_VariableDomPropDep(linkvar_domain,linkvar_name, variable)
Expand Down

0 comments on commit 4851450

Please sign in to comment.