From 99e07448d1bb67f4b10e2234b5f2f18a0acf5de2 Mon Sep 17 00:00:00 2001 From: sheepandshepherd Date: Tue, 9 May 2017 20:18:20 +0200 Subject: Add error printing functions to GDNative --- modules/gdnative/godot.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/gdnative/godot.cpp') diff --git a/modules/gdnative/godot.cpp b/modules/gdnative/godot.cpp index 7477a28db6..4b865966fd 100644 --- a/modules/gdnative/godot.cpp +++ b/modules/gdnative/godot.cpp @@ -30,6 +30,7 @@ #include "godot.h" #include "class_db.h" +#include "error_macros.h" #include "gdnative.h" #include "global_config.h" #include "global_constants.h" @@ -215,6 +216,14 @@ void GDAPI godot_free(void *p_ptr) { memfree(p_ptr); } +void GDAPI godot_print_error(const char *p_description, const char *p_function, const char *p_file, int p_line) { + _err_print_error(p_function, p_file, p_line, p_description, ERR_HANDLER_ERROR); +} + +void GDAPI godot_print_warning(const char *p_description, const char *p_function, const char *p_file, int p_line) { + _err_print_error(p_function, p_file, p_line, p_description, ERR_HANDLER_WARNING); +} + #ifdef __cplusplus } #endif -- cgit v1.2.3