summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/autotrace/exception.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 11:50:49 +0000
commitc853ffb5b2f75f5a889ed2e3ef89b818a736e87a (patch)
tree7d13a0883bb7936b84d6ecdd7bc332b41ed04bee /src/3rdparty/autotrace/exception.h
parentInitial commit. (diff)
downloadinkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.tar.xz
inkscape-c853ffb5b2f75f5a889ed2e3ef89b818a736e87a.zip
Adding upstream version 1.3+ds.upstream/1.3+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/3rdparty/autotrace/exception.h')
-rw-r--r--src/3rdparty/autotrace/exception.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/3rdparty/autotrace/exception.h b/src/3rdparty/autotrace/exception.h
new file mode 100644
index 0000000..793e879
--- /dev/null
+++ b/src/3rdparty/autotrace/exception.h
@@ -0,0 +1,39 @@
+/* exception.h: facility to handle error in autotrace */
+
+#ifndef AT_EXCEPTION_H
+#define AT_EXCEPTION_H
+
+#include "autotrace.h"
+#include "types.h"
+#include <glib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/* Protocol:
+ If a function raises a FATAL(including propagation),
+ the function must release resources allocated by the
+ function itself. */
+ typedef struct _at_exception_type at_exception_type;
+ struct _at_exception_type {
+ at_msg_type msg_type;
+ at_msg_func client_func;
+ gpointer client_data;
+ };
+
+ at_exception_type at_exception_new(at_msg_func client_func, gpointer client_data);
+ gboolean at_exception_got_fatal(at_exception_type * exception);
+ void at_exception_fatal(at_exception_type * exception, const gchar * message);
+ void at_exception_warning(at_exception_type * exception, const gchar * message);
+
+#define AT_ERROR at_error_quark()
+ GQuark at_error_quark(void);
+ typedef enum {
+ AT_ERROR_WRONG_COLOR_STRING,
+ } AtError;
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* Not def: AT_EXCEPTION_H */