Skip to content
Snippets Groups Projects
Commit 4970a2ae authored by Adrien Béraud's avatar Adrien Béraud
Browse files

infohash: throw exception with error message

parent 25b6df53
Branches
Tags
No related merge requests found
......@@ -57,7 +57,7 @@ InfoHash::get(const uint8_t* data, size_t data_len)
int rc = gnutls_fingerprint(algo, &gnudata, h.data(), &s);
if (rc == 0 && s == HASH_LEN)
return h;
throw std::string("Error while hashing");
throw std::runtime_error(std::string("Error hashing: ") + gnutls_strerror(rc));
}
InfoHash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment