From caeaf7dc7e610a5a35c0efc6627eb728404596e3 Mon Sep 17 00:00:00 2001 From: Simon Marchetto Date: Fri, 8 Aug 2014 16:23:24 +0200 Subject: [PATCH] scilab: macro SWIG_SCILAB_ERROR (value 999 by default) for SWIG errors --- Lib/scilab/scirun.swg | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Lib/scilab/scirun.swg b/Lib/scilab/scirun.swg index 2c4eeb841..62d8e4db9 100644 --- a/Lib/scilab/scirun.swg +++ b/Lib/scilab/scirun.swg @@ -236,10 +236,14 @@ SWIG_Scilab_ErrorType(int code) { } #define SWIG_ErrorType(code) SWIG_Scilab_ErrorType(code) +#ifndef SWIG_SCILAB_ERROR +#define SWIG_SCILAB_ERROR 20000 +#endif + SWIGINTERN void SWIG_Scilab_Error(int code, const char *msg) { - Scierror(999, _("SWIG/Scilab: %s: %s\n"), SWIG_Scilab_ErrorType(code), msg); + Scierror(SWIG_SCILAB_ERROR - code, _("SWIG/Scilab: %s: %s\n"), SWIG_Scilab_ErrorType(code), msg); } #define SWIG_Error(code, msg) SWIG_Scilab_Error(code, msg) @@ -250,15 +254,15 @@ SWIGRUNTIME int SWIG_Scilab_Raise_Ex(const char *obj, const char *type, swig_type_info *descriptor) { if (type) { if (obj) - Scierror(999, "SWIG/Scilab: Exception (%s) occured: %s\n", type, obj); + Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occured: %s\n", type, obj); else - Scierror(999, "SWIG/Scilab: Exception (%s) occured.\n", type); + Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occured.\n", type); } } SWIGRUNTIME int SWIG_Scilab_Raise(const int obj, const char *type, swig_type_info *descriptor) { - Scierror(999, "SWIG/Scilab: Exception (%s) occured.\n", type); + Scierror(SWIG_SCILAB_ERROR, "SWIG/Scilab: Exception (%s) occured.\n", type); } /*