Changeset 442b800 in sasview for calculatorview


Ignore:
Timestamp:
Aug 22, 2012 4:13:20 PM (12 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:
fe112d1a
Parents:
94d6752
Message:

show err msg on syntax err from new model editor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/model_editor.py

    r986da97 r442b800  
    763763        # Prepare for the messagebox 
    764764        if not msg: 
     765            try: 
     766                exec("from %s import Model; print Model().run(0.01)"% \ 
     767                     (self.name)) 
     768            except: 
     769                msg = str(sys.exc_value) + "\n\n" 
     770                msg += "Note: To check the line number if used above\n" 
     771                msg += "open this model file with 'Advanced' editor." 
     772        if not msg: 
     773             
    765774            if self.base != None: 
    766775                self.base.update_custom_combo() 
Note: See TracChangeset for help on using the changeset viewer.