Changeset 500


Ignore:
Timestamp:
2008-01-04T15:42:36+01:00 (7 years ago)
Author:
moo
Message:

don't catch compiler error, just warnings

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r496 r500  
    66ChangeLog 
    77======== 
    8  * compiler errors: all compiler warning (e.g.: E_STRICT) is now cached and is supported for user handler 
     8 * compiler errors: all compiler warning (E_STRICT only currently) is now cached and is supported for user handler 
    99 * added module dependency 
    1010 * live with wrong system time: allow caching files with mtime in further 
  • trunk/processor/processor.m4

    r498 r500  
    746746#ifdef E_STRICT 
    747747DEF_STRUCT_P_FUNC(`xc_compilererror_t', , `dnl {{{ 
    748     DISPATCH(int, type) 
    749748    DISPATCH(uint, lineno) 
    750749    DISPATCH(int, error_len) 
  • trunk/utils.c

    r496 r500  
    526526    sandbox = (xc_sandbox_t *) XG(sandbox); 
    527527    assert(sandbox != NULL); 
     528    if (type != E_STRICT) { 
     529        /* give up, and user handler is not supported in this case */ 
     530        int i; 
     531        zend_uint orig_lineno = CG(zend_lineno); 
     532        zend_error_cb = sandbox->orig_zend_error_cb; 
     533 
     534        for (i = 0; i < sandbox->compilererror_cnt; i ++) { 
     535            compilererror = &sandbox->compilererrors[i]; 
     536            CG(zend_lineno) = compilererror->lineno; 
     537            zend_error(E_STRICT, "%s", compilererror->error); 
     538        } 
     539        CG(zend_lineno) = orig_lineno; 
     540        sandbox->compilererror_cnt = 0; 
     541 
     542        sandbox->orig_zend_error_cb(type, error_filename, error_lineno, format, args); 
     543        return; 
     544    } 
     545 
    528546    if (sandbox->compilererror_cnt <= sandbox->compilererror_size) { 
    529547        if (sandbox->compilererror_size) { 
     
    537555    } 
    538556    compilererror = &sandbox->compilererrors[sandbox->compilererror_cnt++]; 
    539     compilererror->type   = type; 
    540557    compilererror->lineno = error_lineno; 
    541558    compilererror->error_len = zend_vspprintf(&compilererror->error, 0, format, args); 
     
    721738        xc_compilererror_t *error = &sandbox->compilererrors[i]; 
    722739        CG(zend_lineno) = error->lineno; 
    723         zend_error(error->type, "%s", error->error); 
     740        zend_error(E_STRICT, "%s", error->error); 
    724741    } 
    725742    CG(zend_lineno) = 0; 
  • trunk/xcache.c

    r498 r500  
    670670        xc_compilererror_t *error = &p->compilererrors[i]; 
    671671        CG(zend_lineno) = error->lineno; 
    672         zend_error(error->type, "%s", error->error); 
     672        zend_error(E_STRICT, "%s", error->error); 
    673673    } 
    674674    CG(zend_lineno) = 0; 
  • trunk/xcache.h

    r498 r500  
    268268/* {{{ xc_compilererror_t */ 
    269269typedef struct { 
    270     int type; 
    271270    uint lineno; 
    272271    int error_len; 
Note: See TracChangeset for help on using the changeset viewer.