Last active
March 20, 2022 22:26
-
-
Save ckerr/00b253626f33400b3ec9864c2322067e to your computer and use it in GitHub Desktop.
finding source of 'argument not found' error with fmt::format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If fmt is throwing an exception, the breakpoint to set is: | |
`fmt::v8::detail::throw_format_error` | |
Finding the current parameters: | |
```sh | |
rg --no-filename 'fmt::arg' libtransmission gtk daemon utils | sed "s/^.*fmt::arg(\(.*\)\,.*$/\1/" | cut -f2 -d'"' | sort | uniq | |
``` | |
Getting the fmt-arg strings: | |
```sh | |
rg "^msgid" transmission.pot | rg "\{" | sort | |
``` | |
Where `transmission.pot` is generated by https://gist.github.com/ckerr/7528b92401d4aa2b65ae83fd0c07f1c4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gist.github.com/ckerr/7528b92401d4aa2b65ae83fd0c07f1c4