Does `zbus::ProxyBuilder::build` really panic?
zeenix opened this issue · comments
In GitLab by @WhyNotHugo on Feb 23, 2023, 14:10
The docs for zbus::ProxyBuilder::build indicate that it panics if any details are missing. I see however that it returns Result
.
Does it really panic under the hood if details as missing? I do see that it panics if the property cache is not initialized. Any hints on when that might happen?
(I'm mostly wanting to make sure I'm handling all possible error scenarios properly).
This has been on my todo for a while. 😞
ProxyBuilder not making use of Result return.
I do see that it panics if the property cache is not initialized. Any hints on when that might happen?
It can't. You can check from the code that the only way this can panic is not possible.
There are other panic points though (see the ProxyBuilder::build_internal
method) that are documented. What we should do is not panic when those details are missing but rather error out.
In GitLab by @WhyNotHugo on Feb 23, 2023, 17:16
mentioned in commit WhyNotHugo/zbus@a1fb07045aa69c757524e1082355319da2f240b9
In GitLab by @WhyNotHugo on Feb 23, 2023, 17:18
mentioned in commit WhyNotHugo/zbus@8f3b89f56bf49d8a5145eb5539eaa47632cf93b4
In GitLab by @WhyNotHugo on Feb 24, 2023, 11:10
mentioned in commit WhyNotHugo/zbus@5a3ed367a78ce1cc57f75470efd04e77fd410312
In GitLab by @WhyNotHugo on Feb 24, 2023, 16:07
mentioned in commit WhyNotHugo/zbus@5fd21f81f50a5e86d600c809a8955293dadfdc99
In GitLab by @WhyNotHugo on Feb 24, 2023, 16:23
mentioned in commit WhyNotHugo/zbus@bb5ba3510522d3bee1bd1919c6d936ad7469ff37
In GitLab by @WhyNotHugo on Feb 24, 2023, 16:29
mentioned in commit WhyNotHugo/zbus@03ad22e1f0aaa1bde15408cdbac70a45c442ef5a
In GitLab by @WhyNotHugo on Feb 24, 2023, 16:31
mentioned in commit WhyNotHugo/zbus@58f66620b137858f48b6fc69fae74e2113e1f656
In GitLab by @WhyNotHugo on Feb 24, 2023, 16:32
mentioned in commit WhyNotHugo/zbus@9f698470e8e6d4dc8f67b448f702f6bc90c9522a
In GitLab by @WhyNotHugo on Feb 24, 2023, 16:36
mentioned in commit WhyNotHugo/zbus@9aeb1409fad64ead9dd81c303cfc385253fabb81
In GitLab by @WhyNotHugo on Feb 24, 2023, 18:12
mentioned in commit WhyNotHugo/zbus@71c3cc9b62cc2ea5e871c9976305f59df8c8cc7f
mentioned in commit eec02b4