Changeset 3821135574760be709319f24bb718263569486b4

Show
Ignore:
Timestamp:
11/18/10 21:27:59 (3 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1290115679 +0000
git-parent:

[32ceedd1d91a2fea4727ea7d82520738a9363be9]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1290115679 +0000
Message:

stackless lua errors should be put in the status while sanitizing the fileinfo

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/lua.c

    rdf9ad58 r3821135  
    641641      if(base>0) { 
    642642        if(lua_isstring(ci->coro_state, base)) { 
    643           const char *err; 
    644           noitL(nldeb, "lua err: %s\n", lua_tostring(ci->coro_state, base)); 
    645           err = lua_tostring(ci->coro_state, base - 2); 
    646           if(err) { 
     643          const char *err, *nerr; 
     644          err = lua_tostring(ci->coro_state, base); 
     645          nerr = lua_tostring(ci->coro_state, base - 2); 
     646          if(nerr && *nerr == 31) nerr = NULL; // 31? WTF lua? 
     647          if(!nerr && err) { 
     648            nerr = strchr(err, ' '); /* advance past the file */ 
     649            if(nerr) nerr += 1; 
     650          } 
     651          if(nerr) { 
    647652            free(ci->current.status); 
    648             ci->current.status = strdup(err); 
     653            ci->current.status = strdup(nerr); 
    649654          } 
    650655        }