Changeset 8163:5a1a72aa8516 in orange


Ignore:
Timestamp:
08/11/11 12:27:02 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
a6822e8112b6966d98efb13923928aac237aecca
Message:

Made some changes to error handling when pickling SVMClassifier objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/orange/svm.cpp

    r8133 r8163  
    31493149int svm_save_model_alt(string& buffer, const svm_model *model){ 
    31503150    FILE *fp = tmpfile(); 
    3151     if(fp==NULL) return -1; 
     3151 
     3152    if(fp==NULL) 
     3153    { 
     3154        perror("tmpfile"); 
     3155        return -1; 
     3156    } 
    31523157 
    31533158    const svm_parameter& param = model->param; 
     
    32373242    } 
    32383243 
    3239     if (ferror (fp) != 0){ 
    3240         perror ("") ; 
    3241         fclose (fp); 
     3244    if (ferror(fp) != 0){ 
     3245        perror("fgets"); 
     3246        fclose(fp); 
    32423247        return -1; 
    32433248    } 
Note: See TracChangeset for help on using the changeset viewer.