Skip to content

Commit 39a4cf1

Browse files
committed
fix(): Fix for #6
1 parent 0d4bf85 commit 39a4cf1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backends/reactivemp.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ function write_fconstraint_option(form, variables, fconstraint)
129129
end
130130

131131
factorisation = Expr(:tuple, map(f -> Expr(:tuple, f...), indexed)...)
132+
errorstr = """Invalid factorisation constraint: ($fconstraint). Arguments are not unique, check node's interface names and model specification variable names."""
132133

133-
return :(factorisation = GraphPPL.check_uniqueness($factorisation) ? GraphPPL.sorted_factorisation($factorisation) : error("Invalid factorisation constraint: $fconstraint. Arguments are not unique"))
134+
return :(factorisation = GraphPPL.check_uniqueness($factorisation) ? GraphPPL.sorted_factorisation($factorisation) : error($errorstr))
134135
elseif @capture(fconstraint, MeanField())
135136
return :(factorisation = MeanField())
136137
elseif @capture(fconstraint, FullFactorisation())

0 commit comments

Comments
 (0)