Show
Ignore:
Timestamp:
09/09/10 13:03:26 (21 months ago)
Author:
westram
Message:
  • report more information about broken configurations
  • GBT_commit_rename_session did NEVER report error (since [2])
    • added __ATTR__USERESULT
  • forward error in AWTC_pars_names (and abort complete rename)
  • this fixes the bug with noticable broken configs after merge/rename
    • cause of bug: the config parser used inside ABRDB is much more picky than the one used in NTREE (needs to be DRYed)
    • no idea when this bug was introduced (maybe by introduction of GBT_config_parser in [3824]) and why it popped up now
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ARBDB/adname.cxx

    r6656 r6811  
    159159 
    160160GB_ERROR GBT_commit_rename_session(int (*show_status)(double gauge), int (*show_status_text)(const char *)) { 
     161    // goes to header: __ATTR__USERESULT 
    161162    GB_ERROR error = 0; 
    162163 
     
    228229 
    229230                        if (!error) freeset(*configStrPtr, GBS_strclose(strstruct)); 
     231                        else { 
     232                            error = GBS_global_string("Failed to parse configuration '%s' (Reason: %s)", config_names[count], error); 
     233                        } 
    230234 
    231235                        GBT_free_config_item(item); 
     
    233237                    } 
    234238 
    235                     if (!error && need_save) error = GBT_save_configuration_data(config, NameSession.gb_main, config_names[count]); 
     239                    if (!error && need_save) { 
     240                        error = GBT_save_configuration_data(config, NameSession.gb_main, config_names[count]); 
     241                    } 
    236242                } 
    237243                if (show_status) show_status((double)(count+1)/config_count); 
     
    262268    gbt_free_rename_session_data(); 
    263269 
    264     error = GB_pop_transaction(NameSession.gb_main); 
     270    error = GB_end_transaction(NameSession.gb_main, error); 
    265271    return error; 
    266272}