2832 | @@ -2833,7 +2833,7 @@ static RPCHelpMan loadtxoutset()
2833 |
2834 | auto activation_result{chainman.ActivateSnapshot(afile, metadata, false)};
2835 | if (!activation_result) {
2836 | - throw JSONRPCError(RPC_INTERNAL_ERROR, strprintf(_("Unable to load UTXO snapshot: %s\n"), util::ErrorString(activation_result)).original);
2837 | + throw JSONRPCError(RPC_INTERNAL_ERROR, strprintf("Unable to load UTXO snapshot: %s. (%s)", util::ErrorString(activation_result).original, path.utf8string()));
nit: It looks like there might be an extraneous period for at least some error messages (between the error message and the parenthesis-wrapped path).
Created a snapshot with dumptxoutset.
Modified a byte in the snapshot to induce failure during load.
$ src/bitcoin-cli loadtxoutset mytxoutset.dat
error code: -32603
error message:
Unable to load UTXO snapshot: assumeutxo block hash in snapshot metadata not recognized (hash: 767fccc851802c0180a3ebf1631ab978d4d6a5ae1d452dc26e9c177850708e6c, height: 101). The following snapshot heights are available: 110, 299.. (/home/dev/.bitcoin/regtest/mytxoutset.dat)