Changeset dcb91cf in sasview for src/sas/sascalc/dataloader/readers/cansas_reader.py
- Timestamp:
- Aug 21, 2017 8:16:13 AM (7 years ago)
- 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:
- 7b15990
- Parents:
- 44daa56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/dataloader/readers/cansas_reader.py
r248ff73 rdcb91cf 157 157 raise DataReaderException(invalid_xml) # Handled by base class 158 158 except FileContentsException as fc_exc: 159 if not self.extension in self.ext: # If the file has no associated loader160 raise DefaultReaderException(msg)161 159 msg = "CanSAS Reader could not load the file {}".format(xml_file) 162 160 if fc_exc.message is not None: # Propagate error messages from earlier 163 161 msg = fc_exc.message 162 if not self.extension in self.ext: # If the file has no associated loader 163 raise DefaultReaderException(msg) 164 164 raise FileContentsException(msg) 165 165 pass … … 179 179 self.set_xml_file(xml_file) 180 180 except etree.XMLSyntaxError: # File isn't valid XML so can't be loaded 181 msg = " Cansas cannot load {}.\nInvalid XML syntax".format(xml_file)181 msg = "SasView cannot load {}.\nInvalid XML syntax".format(xml_file) 182 182 raise FileContentsException(msg) 183 183 … … 207 207 return True # Why is this required? 208 208 # If we get to this point then file isn't valid CanSAS 209 logger.warning("File doesn't meet CanSAS schema. Trying to load anyway.") 209 210 raise FileContentsException("The file is not valid CanSAS") 210 211
Note: See TracChangeset
for help on using the changeset viewer.