summaryrefslogtreecommitdiffstats
path: root/doxygen/examples/H5E_examples.c
diff options
context:
space:
mode:
Diffstat (limited to 'doxygen/examples/H5E_examples.c')
-rw-r--r--doxygen/examples/H5E_examples.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/doxygen/examples/H5E_examples.c b/doxygen/examples/H5E_examples.c
index deea838..bd0ac61 100644
--- a/doxygen/examples/H5E_examples.c
+++ b/doxygen/examples/H5E_examples.c
@@ -6,6 +6,9 @@
#include <stdio.h>
#include <stdlib.h>
+#define RESET "\x1b[0m"
+#define RED "\x1b[31m"
+
int
main(void)
{
@@ -34,8 +37,8 @@ main(void)
}
// push a custom error message onto the default stack
- if (H5Epush2(H5E_DEFAULT, __FILE__, __FUNCTION__, __LINE__, cls, major, minor, "Hello, Error!\n") <
- 0) {
+ if (H5Epush2(H5E_DEFAULT, __FILE__, __FUNCTION__, __LINE__, cls, major, minor, "%s Hello, error %s\n",
+ RED, RESET) < 0) {
ret_val = EXIT_FAILURE;
goto fail_push;
}