From 72f3d5b2be13c68c123294f0c379e1e83132411c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 5 Jul 2012 17:41:03 +0000 Subject: Add error callback to world for custom error reporting. git-svn-id: http://svn.drobilla.net/sord/trunk@226 3d64ff67-21c5-427c-a301-fe4f08042e5a --- sord/sord.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'sord') diff --git a/sord/sord.h b/sord/sord.h index 8a800ff..8f1ef38 100644 --- a/sord/sord.h +++ b/sord/sord.h @@ -156,6 +156,18 @@ SORD_API void sord_world_free(SordWorld* world); +/** + Set a function to be called when errors occur. + + The @p error_sink will be called with @p handle as its first argument. If + no error function is set, errors are printed to stderr. +*/ +SORD_API +void +sord_world_set_error_sink(SordWorld* world, + SerdErrorSink error_sink, + void* handle); + /** @} @name Node -- cgit v1.2.1