Hi there,
I am working on a little Seaside-framework that uses AbtConverter and friends to convert and/or validate input in order to enable reuse of existing VAST Code.
My problem is more a cosmetic one, but annoying:
When I use a converter's displayToObject: method and the conversion returns a conversion error, I get an errorText which is prefixed with the MRI group.
For example: An AbtDateConverter returns an AbtConverterError with an errorText like
'Abt.Nls.104.e: Invalid date format.'
I'd like to display the errorText on the Web form, but without the Prefix ''Abt.Nls.104.e:'. I could simply cut off the begining of the text up to a sequence of $:$ , but that's neither a "nice" solution nor guarantueed to work with custom AbtConverter subclasses that don't use NLS for their error messages. These custom converters could retunr a text like 'Not a valid customer number: 12A34'. I'd cut off important info then.
Is there a nicer way of getting to the resulting error message of using a converter?
I currently do something like:
[self input: (cvtr objectToDisplay: self object )]
when: ExError
do: [:err| self addError: err argument printString. err exitWith: nil].
Any pointers?
Kind regards and thanks for reading
Joachim