aboutsummaryrefslogtreecommitdiff
path: root/src/api/helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/helpers.h')
-rw-r--r--src/api/helpers.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/api/helpers.h b/src/api/helpers.h
new file mode 100644
index 0000000000..6d73b6f742
--- /dev/null
+++ b/src/api/helpers.h
@@ -0,0 +1,19 @@
+#ifndef NEOVIM_API_HELPERS_H
+#define NEOVIM_API_HELPERS_H
+
+#include <stdbool.h>
+
+#include "api/defs.h"
+
+/// Start block that may cause vimscript exceptions
+void try_start(void);
+
+/// End try block, set the error message if any and return true if an error
+/// occurred.
+///
+/// @param err Pointer to the stack-allocated error object
+/// @return true if an error occurred
+bool try_end(Error *err);
+
+#endif /* NEOVIM_API_HELPERS_H */
+