libvdo
vdo-error.h
Go to the documentation of this file.
1 
9 #ifndef __VDO_ERROR_H__
10 #define __VDO_ERROR_H__
11 
12 #include <glib.h>
13 
14 G_BEGIN_DECLS
15 
19 #define VDO_ERROR (vdo_error_quark())
20 
24 enum {
46 };
47 
48 GQuark vdo_error_quark(void);
49 
62 gboolean vdo_error_is_expected(GError **error);
63 gboolean vdo_error_is_resource_limitation(GError **error);
64 
65 // Combine g_set_error(..., domain: VDO_ERROR, ...) with "goto exit_failure"
66 #ifndef exit_failure
67 #define exit_failure(error, ...) \
68  *__extension__({g_set_error(error, VDO_ERROR, ##__VA_ARGS__); &&exit_failure;})
69 #endif
70 
71 G_END_DECLS
72 
73 #endif
@ VDO_ERROR_OOM
Definition: vdo-error.h:35
@ VDO_ERROR_NO_BUFFER_SPACE
Definition: vdo-error.h:38
@ VDO_ERROR_FATAL
Definition: vdo-error.h:42
@ VDO_ERROR_NO_DATA
Definition: vdo-error.h:37
@ VDO_ERROR_PERMISSION_DENIED
Definition: vdo-error.h:28
@ VDO_ERROR_IDLE
Definition: vdo-error.h:36
@ VDO_ERROR_FAILED
Definition: vdo-error.h:41
@ VDO_ERROR_NOT_CONTROLLED
Definition: vdo-error.h:43
@ VDO_ERROR_BUFFER_FAILURE
Definition: vdo-error.h:39
@ VDO_ERROR_INTERFACE_DOWN
Definition: vdo-error.h:40
@ VDO_ERROR_CLOSED
Definition: vdo-error.h:30
@ VDO_ERROR_NO_VIDEO
Definition: vdo-error.h:45
@ VDO_ERROR_BUSY
Definition: vdo-error.h:31
@ VDO_ERROR_EXISTS
Definition: vdo-error.h:26
@ VDO_ERROR_NO_EVENT
Definition: vdo-error.h:44
@ VDO_ERROR_HAL
Definition: vdo-error.h:33
@ VDO_ERROR_INVALID_ARGUMENT
Definition: vdo-error.h:27
@ VDO_ERROR_IO
Definition: vdo-error.h:32
@ VDO_ERROR_NOT_SUPPORTED
Definition: vdo-error.h:29
@ VDO_ERROR_DBUS
Definition: vdo-error.h:34
@ VDO_ERROR_NOT_FOUND
Definition: vdo-error.h:25
gboolean vdo_error_is_expected(GError **error)
Check if error is expected.