aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-11-23 18:38:14 -0500
committerJack Lloyd <[email protected]>2018-11-23 18:38:14 -0500
commit761a7f36f708b44c7af1dc9387f324d509b4acf6 (patch)
tree43ee497eb84b98c1f1e04a7e60d95b531ba0a88a /src/lib/ffi/ffi.h
parentae42de8433260a37360d60b0a21665e13c4a63e8 (diff)
parentb909778857b3e0b7eb86ac26c818e5f25baaddbd (diff)
Merge GH #1744 Make exception throws easier to debug
Diffstat (limited to 'src/lib/ffi/ffi.h')
-rw-r--r--src/lib/ffi/ffi.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/ffi/ffi.h b/src/lib/ffi/ffi.h
index fbc396d12..c3712bd97 100644
--- a/src/lib/ffi/ffi.h
+++ b/src/lib/ffi/ffi.h
@@ -54,6 +54,9 @@ API follows a few simple rules:
/**
* Error codes
+*
+* If you add a new value here be sure to also add it in
+* botan_error_description
*/
enum BOTAN_FFI_ERROR {
BOTAN_FFI_SUCCESS = 0,
@@ -63,16 +66,25 @@ enum BOTAN_FFI_ERROR {
BOTAN_FFI_ERROR_BAD_MAC = -2,
BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE = -10,
+
BOTAN_FFI_ERROR_EXCEPTION_THROWN = -20,
BOTAN_FFI_ERROR_OUT_OF_MEMORY = -21,
+ BOTAN_FFI_ERROR_SYSTEM_ERROR = -22,
+ BOTAN_FFI_ERROR_INTERNAL_ERROR = -23,
+
BOTAN_FFI_ERROR_BAD_FLAG = -30,
BOTAN_FFI_ERROR_NULL_POINTER = -31,
BOTAN_FFI_ERROR_BAD_PARAMETER = -32,
BOTAN_FFI_ERROR_KEY_NOT_SET = -33,
BOTAN_FFI_ERROR_INVALID_KEY_LENGTH = -34,
+ BOTAN_FFI_ERROR_INVALID_OBJECT_STATE = -35,
+
BOTAN_FFI_ERROR_NOT_IMPLEMENTED = -40,
BOTAN_FFI_ERROR_INVALID_OBJECT = -50,
+ BOTAN_FFI_ERROR_TLS_ERROR = -75,
+ BOTAN_FFI_ERROR_HTTP_ERROR = -76,
+
BOTAN_FFI_ERROR_UNKNOWN_ERROR = -100,
};