Changeset 332


Ignore:
Timestamp:
Sep 8, 2011, 1:43:43 PM (13 years ago)
Author:
djay
Message:

Print the last message of Python backtrace first.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/service_internal_python.c

    r295 r332  
    138138        if(PyString_Check(trace)){
    139139          char *tpbt=strdup(pbt);
    140           sprintf(pbt,"%s\nTRACE : %s",tpbt,PyString_AsString(trace));
     140          sprintf(pbt,"%s\n%s",tpbt,PyString_AsString(trace));
    141141          free(tpbt);
    142142        }
    143143        else
    144144          fprintf(stderr,"EMPTY TRACE ?");
     145       
     146        char *tpbt=strdup(pbt);
    145147        pName = PyString_FromString("traceback");
    146148        pModule = PyImport_Import(pName);
     
    152154        trace=PyObject_Str(pValue);
    153155        if(PyString_Check(trace))
    154           sprintf(pbt,"%s\nUnable to run your python process properly. Please check the following messages : %s",pbt,PyString_AsString(trace));
     156          sprintf(pbt,"%s\nUnable to run your python process properly. Please check the following messages : %s",tpbt,PyString_AsString(trace));
    155157        else
    156           sprintf(pbt,"%s \n Unable to run your python process properly. Unable to provide any futher informations.",pbt);
     158          sprintf(pbt,"%s \n Unable to run your python process properly. Unable to provide any futher informations. %s",tpbt);
     159        free(tpbt);
    157160        map* err=createMap("text",pbt);
    158161        addToMap(err,"code","NoApplicableCode");
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png