Ignore:
Timestamp:
May 19, 2016 2:32:20 AM (9 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
0c10782
Parents:
9194009 (diff), faa3ae7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge pull request #8 from SasView?/loader_error_handling

Improve loading error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/local_perspectives/data_loader/data_loader.py

    rd85c194 rfaa3ae7  
    155155        """ 
    156156        data_error = False 
    157         for error_data in item.errors: 
     157        if hasattr(item, 'errors'): 
     158            for error_data in item.errors: 
     159                data_error = True 
     160                message += "\tError: {0}\n".format(error_data) 
     161        else: 
     162            logging.error("Loader returned an invalid object:\n %s" % str(item)) 
    158163            data_error = True 
    159             message += "\tError: {0}\n".format(error_data) 
     164         
    160165        data = self.parent.create_gui_data(item, p_file) 
    161166        output[data.id] = data 
     
    203208                                                          error_message) 
    204209            except: 
     210                logging.error(sys.exc_value) 
    205211                any_error = True 
    206212            if any_error or error_message != "": 
Note: See TracChangeset for help on using the changeset viewer.