diff options
Diffstat (limited to 'core/error_macros.h')
| -rw-r--r-- | core/error_macros.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/error_macros.h b/core/error_macros.h index 2bfa94b99..168b2e06f 100644 --- a/core/error_macros.h +++ b/core/error_macros.h @@ -27,12 +27,13 @@ /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ + #ifndef ERROR_MACROS_H #define ERROR_MACROS_H #include "typedefs.h" /** - * Error macros. Unlike exceptions and asserts, these macros try to mantain consistency and stability + * Error macros. Unlike exceptions and asserts, these macros try to maintain consistency and stability * inside the code. It is recommended to always return processable data, so in case of an error, the * engine can stay working well. * In most cases, bugs and/or invalid data are not fatal and should never allow a perfectly running application @@ -310,4 +311,14 @@ extern bool _err_error_exists; _err_error_exists = false; \ } +#define WARN_DEPRECATED \ + { \ + static bool warning_shown=false;\ + if (!warning_shown) {\ + _err_print_error(FUNCTION_STR, __FILE__, __LINE__,"This method has been deprecated and will be removed in the future", ERR_HANDLER_WARNING); \ + _err_error_exists = false; \ + warning_shown=true;\ + }\ + } + #endif |
