Show
Ignore:
Timestamp:
08/18/09 08:34:25 (15 years ago)
Author:
vbarta
Message:

corrected dynamic memory handling in UI::from_setting, more UIException tests

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • library/bdm/base/user_info.h

    r540 r544  
    331331                try { 
    332332                        instance->from_setting ( link.result ); 
    333                 } catch ( SettingException sttng_xcptn ) { 
     333                } catch ( SettingException &sttng_xcptn ) { 
     334                        delete instance; 
     335                        instance = 0; 
    334336                        string msg = "UIException: method "; 
    335337                        msg += class_name; 
    336338                        msg += ".from_setting(Setting&) has thrown a SettingException."; 
    337339                        throw UISettingException(msg, sttng_xcptn.getPath()); 
     340                } catch (...) { 
     341                        delete instance; 
     342                        instance = 0; 
     343                        throw; 
    338344                } 
    339345        } 
     
    521527                try { 
    522528                        instance->to_setting ( set ); 
    523                 } catch ( SettingException sttng_xcptn ) { 
     529                } catch ( SettingException &sttng_xcptn ) { 
    524530                        string msg = "UIException: method "; 
    525531                        msg += class_name;