Ignore:
Timestamp:
Jan 10, 2013, 12:15:05 PM (11 years ago)
Author:
djay
Message:

Return exceptionReport when the session file cannot be red or written.

File:
1 edited

Legend:

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

    r386 r387  
    18491849      tmpPath=getMapFromMaps(m,"main","tmpPath");
    18501850    sprintf(session_file_path,"%s/sess_%s.cfg",tmpPath->value,sessId);
    1851     dumpMapsToFile(tmpSess,session_file_path);
     1851    FILE* teste=fopen(session_file_path,"w");
     1852    if(teste==NULL){
     1853      char tmpMsg[1024];
     1854      sprintf(tmpMsg,_("Unable to create the file : \"%s\" for storing the session maps."),session_file_path);
     1855      map * errormap = createMap("text",tmpMsg);
     1856      addToMap(errormap,"code", "InternalError");
     1857      printExceptionReportResponse(m,errormap);
     1858      freeMap(&errormap);
     1859      free(errormap);
     1860      return;
     1861    }
     1862    else{
     1863      fclose(teste);
     1864      dumpMapsToFile(tmpSess,session_file_path);
     1865    }
    18521866  }
    18531867 
     
    19111925        if(ofile==NULL){
    19121926          char tmpMsg[1024];
    1913           sprintf(tmpMsg,_("Unable to create the file : \"%s\" for storing the final result."),tmpI->name);
     1927          sprintf(tmpMsg,_("Unable to create the file : \"%s\" for storing the %s final result."),file_name,tmpI->name);
    19141928          map * errormap = createMap("text",tmpMsg);
    19151929          addToMap(errormap,"code", "InternalError");
     
    19301944        }
    19311945        addToMap(tmpI->content,"Reference",file_url);
    1932         if(hasExt!=true){
     1946        if(!hasExt){
    19331947          freeMap(&ext);
    19341948          free(ext);
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