MAValidationError

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MAValidationError

keith1y
I came accross a situation in which an MAValidationError was raised
having a tag = nil.
Exception returns messageText from #tag in this case which being a
string does not respond to #label.

MAValidationError-#label
    ^ self tag label ifNil: [ self tag asString ]


Keith

_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: MAValidationError

Lukas Renggli-2
> I came accross a situation in which an MAValidationError was raised
> having a tag = nil.
> Exception returns messageText from #tag in this case which being a
> string does not respond to #label.
>
> MAValidationError-#label
>    ^ self tag label ifNil: [ self tag asString ]

Keith, sorry for coming back to this only now.

I don't see where #label is sent to a MAValidationError instance? The  
current implementation uses MAValidationError>>#printOn: and there are  
some checks built in already. I know this was not always the case. Is  
your patch still useful in the latest version?

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki