aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffi/ffi.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp
index 74c576631..48b9cf803 100644
--- a/src/lib/ffi/ffi.cpp
+++ b/src/lib/ffi/ffi.cpp
@@ -16,7 +16,10 @@ namespace Botan_FFI {
int ffi_error_exception_thrown(const char* func_name, const char* exn, int rc)
{
- fprintf(stderr, "in %s exception '%s' returning %d\n", func_name, exn, rc);
+ if(std::getenv("BOTAN_FFI_PRINT_EXCEPTIONS"))
+ {
+ std::fprintf(stderr, "in %s exception '%s' returning %d\n", func_name, exn, rc);
+ }
return rc;
}