diff options
author | Thaddeus Crews <repiteo@outlook.com> | 2024-10-31 20:14:36 -0500 |
---|---|---|
committer | Thaddeus Crews <repiteo@outlook.com> | 2024-10-31 20:14:36 -0500 |
commit | 163bf94d04342ad8d16086e95ea855a86d3699fc (patch) | |
tree | 6cdd9ec78a0db516c8516af7b0842b5efe426ae3 /core/crypto/crypto_core.cpp | |
parent | 6ca36277abcfd587c8a61193f278899ec2bc5d32 (diff) | |
parent | 38f9769bc6d560373df961880f99aaaafaae00d9 (diff) | |
download | redot-engine-163bf94d04342ad8d16086e95ea855a86d3699fc.tar.gz |
Merge pull request #98091 from AThousandShips/improve_err_prints_core
[Core] Improve error messages with `vformat`
Diffstat (limited to 'core/crypto/crypto_core.cpp')
-rw-r--r-- | core/crypto/crypto_core.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/crypto/crypto_core.cpp b/core/crypto/crypto_core.cpp index 69a83284cc..13852d5177 100644 --- a/core/crypto/crypto_core.cpp +++ b/core/crypto/crypto_core.cpp @@ -70,7 +70,7 @@ int CryptoCore::RandomGenerator::_entropy_poll(void *p_data, unsigned char *r_bu Error CryptoCore::RandomGenerator::init() { int ret = mbedtls_ctr_drbg_seed((mbedtls_ctr_drbg_context *)ctx, mbedtls_entropy_func, (mbedtls_entropy_context *)entropy, nullptr, 0); if (ret) { - ERR_FAIL_COND_V_MSG(ret, FAILED, " failed\n ! mbedtls_ctr_drbg_seed returned an error" + itos(ret)); + ERR_FAIL_COND_V_MSG(ret, FAILED, vformat(" failed\n ! mbedtls_ctr_drbg_seed returned an error %d.", ret)); } return OK; } @@ -78,7 +78,7 @@ Error CryptoCore::RandomGenerator::init() { Error CryptoCore::RandomGenerator::get_random_bytes(uint8_t *r_buffer, size_t p_bytes) { ERR_FAIL_NULL_V(ctx, ERR_UNCONFIGURED); int ret = mbedtls_ctr_drbg_random((mbedtls_ctr_drbg_context *)ctx, r_buffer, p_bytes); - ERR_FAIL_COND_V_MSG(ret, FAILED, " failed\n ! mbedtls_ctr_drbg_seed returned an error" + itos(ret)); + ERR_FAIL_COND_V_MSG(ret, FAILED, vformat(" failed\n ! mbedtls_ctr_drbg_seed returned an error %d.", ret)); return OK; } |