Changeset 8cb8c89 in sasview for guiframe/local_perspectives/data_loader/data_loader.py
- Timestamp:
- May 11, 2011 1:56:49 PM (14 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.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:
- 732b03c
- Parents:
- 99f9ecf
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
guiframe/local_perspectives/data_loader/data_loader.py
r99f9ecf r8cb8c89 158 158 :param error: details error message to be displayed 159 159 """ 160 message = "The data file you selected could not be loaded.\n" 161 message += "Make sure the content of your file" 162 message += " is properly formatted.\n\n" 163 164 if error is not None: 165 message += "When contacting the DANSE team, mention the" 166 message += " following:\n%s" % str(error) 167 dial = wx.MessageDialog(self.parent, message, 'Error Loading File', 160 if error is not None or str(error).strip() != "": 161 dial = wx.MessageDialog(self.parent, str(error), 'Error Loading File', 168 162 wx.OK | wx.ICON_EXCLAMATION) 169 dial.ShowModal()163 dial.ShowModal() 170 164 171 165 def get_file_path(self, path): … … 208 202 self.load_update(output=output, message=message) 209 203 except: 210 error_message = "Error while loading Data: %s\n" % str(p_file) 211 error_message += str(sys.exc_value) + "\n" 212 self.load_update(output=output, message=error_message) 204 error = "Error while loading Data: %s\n" % str(p_file) 205 error += str(sys.exc_value) + "\n" 206 error_message = "The data file you selected could not be loaded.\n" 207 error_message += "Make sure the content of your file" 208 error_message += " is properly formatted.\n\n" 209 error_message += "When contacting the DANSE team, mention the" 210 error_message += " following:\n%s" % str(error) 211 self.load_update(output=output, message=error_message) 213 212 214 213 message = "Loading Data Complete! "
Note: See TracChangeset
for help on using the changeset viewer.