Changeset 986da97 in sasview for sansguiframe/src/sans/guiframe
- Timestamp:
- Jun 28, 2012 4:53:08 PM (12 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:
- 83b81b8
- Parents:
- 9c30b8c
- Location:
- sansguiframe/src/sans/guiframe
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sansguiframe/src/sans/guiframe/gui_statusbar.py
r3fc01c5 r986da97 228 228 """ 229 229 wxStatusB.PopStatusText(self, field=MSG_POSITION) 230 230 231 231 def PushStatusText(self, *args, **kwds): 232 232 """ … … 315 315 size = (height,height)) 316 316 self.bitmap_bt_warning.SetBitmapLabel(icon_bmp) 317 e_msg = "Error(s) Occurred:\n" 318 e_msg += event.status 319 wx.MessageBox(e_msg, style=wx.ICON_ERROR) 317 320 else: 318 321 icon_bmp = wx.ArtProvider.GetBitmap(wx.ART_INFORMATION, -
sansguiframe/src/sans/guiframe/local_perspectives/data_loader/data_loader.py
rc151afc r986da97 177 177 log_msg = '' 178 178 output = {} 179 any_error = False 179 180 error_message = "" 180 info = "info"181 181 for p_file in path: 182 info = "info" 182 183 basename = os.path.basename(p_file) 183 184 root, extension = os.path.splitext(basename) 184 185 if extension.lower() in EXTENSIONS: 186 any_error = True 185 187 log_msg = "Data Loader cannot " 186 188 log_msg += "load: %s\n" % str(p_file) … … 203 205 self.load_update(output=output, message=message, info=info) 204 206 except: 205 error = "Error while loading Data: %s\n" % str(p_file) 206 error += str(sys.exc_value) + "\n" 207 error_message = "The data file you selected could not be loaded.\n" 208 error_message += "Make sure the content of your file" 209 error_message += " is properly formatted.\n\n" 210 error_message += "When contacting the DANSE team, mention the" 211 error_message += " following:\n%s" % str(error) 212 info = "error" 213 self.load_update(output=output, message=error_message, 207 any_error = True 208 if error_message == "": 209 error = "Error: " + str(sys.exc_value) + "\n" 210 error += "while loading Data: \n%s\n" % str(p_file) 211 error_message = "The data file you selected could not be loaded.\n" 212 error_message += "Make sure the content of your file" 213 error_message += " is properly formatted.\n\n" 214 error_message += "When contacting the DANSE team, mention the" 215 error_message += " following:\n%s" % str(error) 216 else: 217 error_message += "%s\n"% str(p_file) 218 info = "error" 219 self.load_update(output=output, message=error_message, 214 220 info=info) 215 221 216 222 message = "Loading Data Complete! " 217 223 message += log_msg 218 if error_message != "":224 if error_message != "": 219 225 info = 'error' 220 226 self.load_complete(output=output, error_message=error_message, … … 226 232 """ 227 233 if message != "": 228 wx.PostEvent(self.parent, StatusEvent(status=message, info= info,234 wx.PostEvent(self.parent, StatusEvent(status=message, info='info', 229 235 type="progress")) 230 236 def load_complete(self, output, message="", error_message="", path=None, … … 236 242 info=info, 237 243 type="stop")) 238 if error_message != "":239 self.load_error(error_message)244 #if error_message != "": 245 # self.load_error(error_message) 240 246 self.parent.add_data(data_list=output) 241 247
Note: See TracChangeset
for help on using the changeset viewer.