Changeset 287d356 in sasview for src/sas/qtgui/Utilities


Ignore:
Timestamp:
Sep 4, 2018 10:58:12 AM (6 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
d738feb
Parents:
e3df84e
Message:

Don't wantonly cast parameter names into lower case. SASVIEW-1016

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/AddMultEditor.py

    raed0532 r287d356  
    1515import re 
    1616import logging 
     17import traceback 
     18 
    1719import sas.qtgui.Utilities.GuiUtils as GuiUtils 
    1820from sasmodels.sasview_model import load_standard_models 
     
    202204                                     self.cbOperator.currentText()) 
    203205 
    204         success = GuiUtils.checkModel(self.plugin_filename) 
     206        try: 
     207            success = GuiUtils.checkModel(self.plugin_filename) 
     208        except Exception as ex: 
     209            # broad exception from sasmodels 
     210            msg = "Error building model: "+ str(ex) 
     211            logging.error(msg) 
     212            #print three last lines of the stack trace 
     213            # this will point out the exact line failing 
     214            last_lines = traceback.format_exc().split('\n')[-4:] 
     215            traceback_to_show = '\n'.join(last_lines) 
     216            logging.error(traceback_to_show) 
     217 
     218            # Set the status bar message 
     219            self.parent.communicate.statusBarUpdateSignal.emit("Model check failed") 
     220            return 
    205221 
    206222        if not success: 
Note: See TracChangeset for help on using the changeset viewer.