Changeset f43827cc in sasview for invariantview/perspectives


Ignore:
Timestamp:
Mar 18, 2010 10:30:27 AM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
d2f1595
Parents:
437e639
Message:

add error check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/perspectives/invariant/invariant_panel.py

    r437e639 rf43827cc  
    382382        porod_const = self.get_porod_const()         
    383383        contrast = self.get_contrast() 
    384         #Compute volume and set value to txtcrtl 
    385         self.get_volume(inv=inv, contrast=contrast, extrapolation=extrapolation) 
    386         #compute surface and set value to txtcrtl 
    387         self.get_surface(inv=inv, contrast=contrast, porod_const=porod_const,  
     384        try: 
     385            #Compute volume and set value to txtcrtl 
     386            self.get_volume(inv=inv, contrast=contrast, extrapolation=extrapolation) 
     387            #compute surface and set value to txtcrtl 
     388        except: 
     389            msg= "Error occurred computing invariant: %s"%sys.exc_value 
     390            wx.PostEvent(self.parent, StatusEvent(status= msg)) 
     391        try: 
     392            self.get_surface(inv=inv, contrast=contrast, porod_const=porod_const,  
    388393                                    extrapolation=extrapolation) 
     394        except: 
     395            msg= "Error occurred computing invariant: %s"%sys.exc_value 
     396            wx.PostEvent(self.parent, StatusEvent(status= msg)) 
     397       
    389398        #enable the button_ok for more details 
    390399        self.button_ok.Enable() 
Note: See TracChangeset for help on using the changeset viewer.