Ignore:
Timestamp:
Apr 18, 2012 4:34:21 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
b1432b9
Parents:
6184b4e
Message:

improved error msg in details dialog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • invariantview/src/sans/perspectives/invariant/invariant_details.py

    ra3efdeb ree54fcf0  
    101101            except: 
    102102                self.qstar_high_percent = 'error' 
    103         self.check_values() 
     103        wx.CallAfter(self.check_values) 
    104104    
    105105    def check_values(self): 
     
    119119        msg = '' 
    120120        if self.qstar_percent == 'error': 
    121             self.existing_warning = True 
    122             msg = 'Error occurred when computing invariant from data.\n ' 
     121            try: 
     122                float(self.qstar) 
     123            except: 
     124                self.existing_warning = True 
     125                msg += 'Error occurred when computing invariant from data.\n ' 
    123126        if self.qstar_percent > 1: 
    124127            self.existing_warning = True 
     
    126129            msg += "than 100% .\n" 
    127130        if self.qstar_low_percent == 'error': 
    128             self.existing_warning = True 
    129             msg = "Error occurred when computing extrapolated invariant" 
    130             msg += " at low-Q region.\n" 
     131            try: 
     132                float(self.qstar_low) 
     133            except: 
     134                self.existing_warning = True 
     135                msg += "Error occurred when computing extrapolated invariant" 
     136                msg += " at low-Q region.\n" 
    131137        elif self.qstar_low_percent is not None : 
    132138            if self.qstar_low_percent >= 0.05: 
     
    142148                msg += "than 100% .\n" 
    143149        if self.qstar_high_percent == 'error': 
    144             self.existing_warning = True 
    145             msg += 'Error occurred when computing extrapolated' 
    146             msg += ' invariant at high-Q region.\n' 
     150            try: 
     151                float(self.qstar_high) 
     152            except: 
     153                self.existing_warning = True 
     154                msg += 'Error occurred when computing extrapolated' 
     155                msg += ' invariant at high-Q region.\n' 
    147156        elif self.qstar_high_percent is not None: 
    148157            if self.qstar_high_percent >= 0.05: 
Note: See TracChangeset for help on using the changeset viewer.