@@ -1167,23 +1167,36 @@ function Base.showerror(io::IO, error::RuleMethodError)
11671167 node_rules = filter (m -> ReactiveMP. get_node_from_rule_method (m) == spec_fform, methods (ReactiveMP. rule))
11681168 println (io, " Alternatively, consider re-specifying model using an existing rule:\n " )
11691169
1170- node_message_names = filter (x -> x != [" Nothing" ], get_message_names_from_rule_method .(node_rules))
1171- node_message_types = filter (! isempty, get_message_types_from_rule_method .(node_rules))
1172- for (m_name, m_type) in zip (node_message_names, node_message_types)
1173- message_input = [string (" m_" , n, " ::" , t) for (n, t) in zip (m_name, m_type)]
1174- println (io, spec_fform, " (" , join (message_input, " , " ), " )" )
1175- end
1170+ for node_rule in node_rules
1171+ node_message_names = filter (x -> x != [" Nothing" ], get_message_names_from_rule_method (node_rule))
1172+ node_message_types = filter (! isempty, get_message_types_from_rule_method (node_rule))
11761173
1177- node_marginal_names = filter (x -> x != [" Nothing" ], get_marginal_names_from_rule_method .(node_rules))
1178- node_marginal_types = filter (! isempty, get_marginal_types_from_rule_method .(node_rules))
1179- for (m_name, m_type) in zip (node_marginal_names, node_marginal_types)
1180- marginal_input = [string (" q_" , n, " ::" , t) for (n, t) in zip (m_name, m_type)]
1181- println (io, spec_fform, " (" , join (marginal_input, " , " ), " )" )
1182- end
1183- if ! isempty (node_marginal_names)
1184- println (io, " \n Note that for marginal rules (i.e., involving q_*), the order of input types matters." )
1174+ node_marginal_names = filter (x -> x != [" Nothing" ], get_marginal_names_from_rule_method (node_rule))
1175+ node_marginal_types = filter (! isempty, get_marginal_types_from_rule_method (node_rule))
1176+
1177+ node_meta = get_meta_from_rule_method (node_rule)
1178+
1179+ node_message_input = [string (" m_" , n, " ::" , t) for (n, t) in zip (node_message_names, node_message_types)]
1180+ node_marginal_input = [string (" q_" , n, " ::" , t) for (n, t) in zip (node_marginal_names, node_marginal_types)]
1181+
1182+ print (io, spec_fform)
1183+ print (io, " (" )
1184+ join (io, node_message_input, " , " )
1185+ if ! isempty (node_marginal_input)
1186+ print (io, " , " )
1187+ end
1188+ join (io, node_marginal_input, " , " )
1189+ print (io, " , " )
1190+
1191+ if node_meta != = " Nothing"
1192+ print (io, " meta::" , node_meta)
1193+ end
1194+
1195+ print (io, " )" )
1196+ println (io)
11851197 end
11861198
1199+ println (io, " \n Note that for rules involving `q_*`, the order of input types matters." )
11871200 else
11881201 println (io, " \n\n [WARN]: Non-standard rule layout found! Possible fix, define rule with the following arguments:\n " )
11891202 println (io, " rule.fform: " , error. fform)
0 commit comments