MAValidationError

View: New views
2 Messages — Rating Filter:   Alert me  

MAValidationError

by Keithy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: MAValidationError

by Lukas Renggli-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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