[ANN] V4RB 2.0b2
jda
jda at his.com
Tue May 18 16:12:30 CDT 2004
>
>
>I have one hope.
>May be I will be able
>
>A) throw exceptions
>
>B) have flag: do not throw.
> developers that use EXISTED code, can set it OFF
> to not break code
>
>C) even if throw exc, db.LastError still will return last erro code.
>
There are other folks on this list with a better OOP background than
I, so I defer to them. But I like #3. There are times when a db.error
is expected and you don't want an exception thrown. For example, I
have a field for a unique ID. When I create a record, I assign a new
unique ID. I then check the db.error property to see if this caused a
"not unique" error. If so I loop through again, assigning a new
unique id, until I don't get the error any more. I think this would
be more cumbersome if the assignment of a non-unique ID threw an
exception (and took control away from my code loop).
Jon
More information about the Valentina-beta
mailing list