Changeset 0615d54 in sasview for src/sas/sascalc


Ignore:
Timestamp:
Jul 31, 2017 5:07:23 AM (7 years ago)
Author:
lewis
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
9df816b
Parents:
8dec7e7
Message:

Correctly set error message in CanSAS XML reader

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/cansas_reader.py

    r8dec7e7 r0615d54  
    152152                    raise DataReaderException(invalid_xml) # Handled by base class 
    153153                except FileContentsException as fc_exc: 
    154                     msg = "CanSAS Reader could not load the file {}".format(xml_file) 
    155154                    if not self.extension in self.ext: # If the file has no associated loader 
    156155                        raise DefaultReaderException(msg) 
     156                    msg = "CanSAS Reader could not load the file {}".format(xml_file) 
    157157                    if fc_exc.message is not None: # Propagate error messages from earlier 
    158                         msg += "\n" + fc_exc.message 
     158                        msg = fc_exc.message 
    159159                    raise FileContentsException(msg) 
    160160                    pass 
Note: See TracChangeset for help on using the changeset viewer.