basic/log: assert that %m is not used when error is not set
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 14 Apr 2021 11:39:14 +0000 (13:39 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 14 Apr 2021 14:19:54 +0000 (16:19 +0200)
commit63275a70323f2535aa943e47e827ec65a7358f0e
tree7e00cdbf501e007d06525b80586e3faf88cb6d78
parentcbe97b9c92728e96c9987314a7e1e05bbdffda16
basic/log: assert that %m is not used when error is not set

This is only done in developer mode. It is a pretty rare occurence that we
make this kind of mistake. And even if it happens, the result is just a misleading
error message. So let's only do the check in non-release builds.
src/basic/log.h