Print

Print


Grand. I didn't intend to throw you guys a whole lot of work, but if a 
newcomer's first experience of analysis is such a user-unfriendly error 
message, they might be discouraged.

On Thu, 19 Mar 2009, Wayne Boucher wrote:

> OK, I've added a more sensible error message in this one context.  (I hope 
> "alphanumeric" means something to everyone.)
>
> Wayne
>
> On Thu, 19 Mar 2009, Wayne Boucher wrote:
>
>> I agree with Rasmus.  As it happens, though, we already check that the 
>> project name has no white space before tossing it to the API so we could 
>> also add in the other constraints in this specific context.  This code 
>> duplicates the API checks of course but perhaps worth it in this context.
>> 
>> Wayne
>> 
>> On Thu, 19 Mar 2009, Rasmus Fogh wrote:
>> 
>>> Dear Dan,
>>> 
>>> That could be done - in that particular instance. The problem is whether 
>>> we want to fix only this error message, or all the other similar ones that 
>>> appear in other contexts.
>>> 
>>> Yours,
>>> 
>>> Rasmus
>>>
>>> 
>>> ---------------------------------------------------------------------------
>>> Dr. Rasmus H. Fogh                  Email: [log in to unmask]
>>> Dept. of Biochemistry, University of Cambridge,
>>> 80 Tennis Court Road, Cambridge CB2 1GA, UK.     FAX (01223)766002
>>> 
>>> On Thu, 19 Mar 2009, Daniel O'Donovan wrote:
>>> 
>>>> I don't know if this is what Brian meant, but maybe Analysis could parse 
>>>> the suggested project name for badness and then pop up an error box if 
>>>> bad rather than sending a bad name to the data model (and thence the ugly 
>>>> output)..
>>>> 
>>>> My two p,
>>>> 
>>>> Dan
>>>> 
>>>> On 19 Mar 2009, at 09:51, Rasmus Fogh wrote:
>>>> 
>>>>> Dear All,
>>>>> 
>>>>> It would not be that easy to do. We have constraints on objects, 
>>>>> attributes, and data types. Constraints on DataTypes, especially, could 
>>>>> appear in all kinds of contexts, so when you write the actual constraint 
>>>>> you may know very little about the context you are dealing with. And we 
>>>>> woudl not want to handcode error messages for every single attribute of 
>>>>> type Word, for example.
>>>>> 
>>>>> We could try to make ti a bit more user friendly, but it is too big a 
>>>>> job to be done any time soon.
>>>>> 
>>>>> Yours,
>>>>> 
>>>>> Rasmus
>>>>> 
>>>>> 
>>>>>
>>>>> 
>>>>> ---------------------------------------------------------------------------
>>>>> Dr. Rasmus H. Fogh                  Email: [log in to unmask]
>>>>> Dept. of Biochemistry, University of Cambridge,
>>>>> 80 Tennis Court Road, Cambridge CB2 1GA, UK.     FAX (01223)766002
>>>>> 
>>>>> On Wed, 18 Mar 2009, Wayne Boucher wrote:
>>>>> 
>>>>>> We figured we'd want to scare you enough so that you never, ever did it 
>>>>>> again.
>>>>>> 
>>>>>> Well, the serious point is that that error message is the generic kind 
>>>>>> of message we get from the CCPN API.  In Analysis we don't try and turn 
>>>>>> it into a more sensible error message because that would be a big 
>>>>>> translation job (i.e. lots of things could go wrong so we'd need to do 
>>>>>> a big translation job).  Now whether the API could produce more user 
>>>>>> friendly error messages is a question for Rasmus (that would still be a 
>>>>>> big job).
>>>>>> 
>>>>>> Wayne
>>>>>> 
>>>>>> On Wed, 18 Mar 2009, Brian Smith wrote:
>>>>>> 
>>>>>>> Got the following traceback when I mistakenly tried to create a new 
>>>>>>> project with a "-" in the name. Maybe a less scary warning would be 
>>>>>>> nice?
>>>>>>> Traceback (most recent call last):
>>>>>>> File "/usr/lib/python2.4/lib-tk/Tkinter.py", line 1345, in __call__
>>>>>>>  return self.func(*args)
>>>>>>> File 
>>>>>>> "/usr/local/ccpnmr/temporaryReleaseDir/ccpnmr/ccpnmr2.0/python/ccpnmr/analysis/AnalysisPopup.py", 
>>>>>>> line 1117, in newProject
>>>>>>>  project = Impl.MemopsRoot(name=name)
>>>>>>> File 
>>>>>>> "/usr/local/ccpnmr/temporaryReleaseDir/ccpnmr/ccpnmr2.0/python/memops/api/Implementation.py", 
>>>>>>> line 5794, in __init__
>>>>>>> File 
>>>>>>> "/usr/local/ccpnmr/temporaryReleaseDir/ccpnmr/ccpnmr2.0/python/memops/api/Implementation.py", 
>>>>>>> line 7939, in checkValid
>>>>>>> ApiError: memops.Implementation.MemopsRoot.checkValid: name:
>>>>>>>     name constraint value_is_alphanumeric_or_underscore violated by 
>>>>>>> value:
>>>>>>> Dr. Brian O. Smith ---------------------- B Smith at bio gla ac uk
>>>>>>>          Division of Molecular & Cellular Biology,
>>>>>>>            Faculty of Biomedical & Life Sciences,
>>>>>>> Joseph Black Building, University of Glasgow, Glasgow G12 8QQ, UK.
>>>>>>> Tel: 0141 330 5167/6459/3089                    Fax: 0141 330 4600
>>>>>>> -------------------------------------------------------------------
>>>>>>> The University of Glasgow, charity number SC004401
>>>>>> 
>>>> 
>>>> Daniel O'Donovan
>>>> [log in to unmask]
>>> 
>> 
>

Dr. Brian O. Smith ---------------------- B Smith at bio gla ac uk
             Division of Molecular & Cellular Biology,
               Faculty of Biomedical & Life Sciences,
Joseph Black Building, University of Glasgow, Glasgow G12 8QQ, UK.
Tel: 0141 330 5167/6459/3089                    Fax: 0141 330 4600
-------------------------------------------------------------------
The University of Glasgow, charity number SC004401