summaryrefslogtreecommitdiff
path: root/src/htslib.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-05-14 20:12:42 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-05-14 20:12:42 +0000
commitc05f54ae04c8b905ce31b66f136df578f868d9e6 (patch)
treeb212cbe5650e4be66987ea8e98f847e91fa2da50 /src/htslib.c
parentae1db762e79326b07a57301ad252f8e0ae0b42a2 (diff)
Clean hts_set_error_callback() and hts_get_error_callback()
Diffstat (limited to 'src/htslib.c')
-rw-r--r--src/htslib.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/htslib.c b/src/htslib.c
index fbea649..08297bf 100644
--- a/src/htslib.c
+++ b/src/htslib.c
@@ -5116,6 +5116,14 @@ static int ssl_vulnerable(const char *version) {
/* user abort callback */
htsErrorCallback htsCallbackErr = NULL;
+HTSEXT_API void hts_set_error_callback(htsErrorCallback handler) {
+ htsCallbackErr = handler;
+}
+
+HTSEXT_API htsErrorCallback hts_get_error_callback() {
+ return htsCallbackErr;
+}
+
static void default_inthash_asserthandler(void *arg, const char* exp, const char* file, int line) {
abortf_(exp, file, line);
}