Skip to content

Commit e9ad37e

Browse files
committed
provide a better error message for refinement failure, as in #292
1 parent 650303d commit e9ad37e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

GSASII/GSASIIdataGUI.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5767,7 +5767,12 @@ def OnRefine(self,event):
57675767
finally:
57685768
dlg.Destroy()
57695769
else:
5770-
self.ErrorDialog('Refinement error',Rvals['msg'])
5770+
self.ErrorDialog('Refinement error',Rvals['msg']+'''
5771+
\nNote that when GSAS-II fails in a refinement, this is often
5772+
because parameters are varied in incompatible ways. You are
5773+
suggested to use Calculate/"View LS params" to review what
5774+
is being refined.
5775+
''')
57715776

57725777
def OnLeBail(self,event):
57735778
'''Do a 1 cycle LeBail refinement with no other variables; usually done upon initialization of a LeBail refinement
@@ -6321,6 +6326,7 @@ def OnRunPlotXNFF(self,evnt):
63216326

63226327
def ErrorDialog(self,title,message,parent=None, wtype=wx.OK):
63236328
'Display an error message'
6329+
# TODO: really would be better to have something customized for this
63246330
result = None
63256331
if parent is None:
63266332
dlg = wx.MessageDialog(self, message, title, wtype)

0 commit comments

Comments
 (0)