diff options
author | Ananmay Suri | 2021-04-21 17:18:26 +0530 |
---|---|---|
committer | Ananmay Suri | 2021-04-21 17:18:26 +0530 |
commit | 20085f1e0c1629b76f4f56a22ce74028148a1dc7 (patch) | |
tree | 070bc9bbe5dd8eaf061b94cfaa7d4aa5d1ac49d9 | |
parent | 8c6df40237b718d34c4f3cadc82386d362b2592c (diff) | |
download | fossee-scilab-octave-toolbox-20085f1e0c1629b76f4f56a22ce74028148a1dc7.tar.gz fossee-scilab-octave-toolbox-20085f1e0c1629b76f4f56a22ce74028148a1dc7.tar.bz2 fossee-scilab-octave-toolbox-20085f1e0c1629b76f4f56a22ce74028148a1dc7.zip |
Removed unwanted error statements
-rw-r--r-- | jar/scilab_en_US_help.jar | bin | 16524 -> 16524 bytes | |||
-rw-r--r-- | macros/octave_fun.bin | bin | 5099 -> 5099 bytes | |||
-rwxr-xr-x | sci_gateway/cpp/libscilab_octave.so | bin | 27400 -> 27400 bytes | |||
-rw-r--r-- | sci_gateway/cpp/sci_octave.cpp | 39 |
4 files changed, 19 insertions, 20 deletions
diff --git a/jar/scilab_en_US_help.jar b/jar/scilab_en_US_help.jar Binary files differindex 8dd28e5..02270d7 100644 --- a/jar/scilab_en_US_help.jar +++ b/jar/scilab_en_US_help.jar diff --git a/macros/octave_fun.bin b/macros/octave_fun.bin Binary files differindex ea3dc49..065f472 100644 --- a/macros/octave_fun.bin +++ b/macros/octave_fun.bin diff --git a/sci_gateway/cpp/libscilab_octave.so b/sci_gateway/cpp/libscilab_octave.so Binary files differindex 5802301..e5c4f0f 100755 --- a/sci_gateway/cpp/libscilab_octave.so +++ b/sci_gateway/cpp/libscilab_octave.so diff --git a/sci_gateway/cpp/sci_octave.cpp b/sci_gateway/cpp/sci_octave.cpp index 2e22b97..5f1f685 100644 --- a/sci_gateway/cpp/sci_octave.cpp +++ b/sci_gateway/cpp/sci_octave.cpp @@ -58,7 +58,7 @@ int sci_octave_fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt* o char* c; double* n = NULL; int row = 0; - int col = 0; + int col = 0; double* in_real; double* in_img; @@ -149,27 +149,26 @@ int sci_octave_fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt* o } } else - { - Scierror(999, _("%s: Wrong type of input argument %d.\n"), fname, i); - return STATUS_ERROR; - } + { + Scierror(999, _("%s: Wrong type of input argument %d.\n"), fname, i); + return STATUS_ERROR; + } } - // Capturing Errors and warnings - std::stringstream buffer_err; - - // set our error buffer - std::cerr.rdbuf(buffer_err.rdbuf()); + // Capturing Errors and warnings + std::stringstream buffer_err; - int status_fun = fun(argptr, funptr); + // set our error buffer + std::cerr.rdbuf(buffer_err.rdbuf()); - // grab error buffer contents - std::string err = buffer_err.str(); - if(!err.empty()) - sciprint("%s", err.c_str()); - buffer_err.str(""); + int status_fun = fun(argptr, funptr); + // grab error buffer contents + std::string err = buffer_err.str(); + if(!err.empty() && status_fun==0) + sciprint("Warning from Octave\n%s", err.c_str()); + buffer_err.str(""); //printf("in scilab status_fun is: %d\n", status_fun); //printf("in scilab funcall.n_out_arguments is: %d\n", funcall.n_out_arguments); //printf("in scilab funcall.n_out_user is: %d\n", funcall.n_out_user); @@ -180,7 +179,7 @@ int sci_octave_fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt* o //printf("in scilab ouput args are: %d\n", funcall.n_out_arguments); if(status_fun==1) { - Scierror(999, ""); + Scierror(999,"Error from Octave\n%s", err.c_str()); return 1; } else if(funcall.n_out_user <= funcall.n_out_arguments) @@ -227,9 +226,9 @@ int sci_octave_fun(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt* o } else { - Scierror(77, _("%s: Wrong number of output arguments: This function can return a maximum of %d output(s).\n"), fname, funcall.n_out_arguments); - return 1; - } + Scierror(77, _("%s: Wrong number of output arguments: This function can return a maximum of %d output(s).\n"), fname, funcall.n_out_arguments); + return 1; + } |