[Gambas-user] Replace (Internal) Error Message

T Lee Davidson t.lee.davidson at gmail.com
Tue May 23 14:56:35 CEST 2023


On 5/23/23 07:26, Hans Lehmann wrote:
> Hello.
> 
> When I use the following procedure:
> 
> Public Sub dcFlowername_Validate(Value As Variant)
> 
>       If IsNull(Value) Then
>      '-- Message.Warning(Subst("&1<br>&2<b> &3 </b>&4", ("No flower name was entered!"), ("The data set is"), ("not"), ("saved!")))
>      '-- An *internal* error message is displayed!
>          Return
>       Endif
> 
> End
> 
> the same meaningless error message "Invalid value" is always displayed.
> 
> Is there a way to replace this internal error message with a meaningful error message of my own?
> 
> With kind regards
> 
> Hans

When I use "dcFlowername_Validate(Null)" to call your procedure exactly as you have it, ie. with the Message.Warning line 
commented out, I get no error whatsoever.

Can you provide a small project that reproduces the error?


-- 
Lee



More information about the User mailing list