[ANN] V4RB 2.0b2

Ruslan Zasukhin sunshine at public.kherson.ua
Tue May 18 23:28:26 CDT 2004


On 5/18/04 11:12 PM, "jda" <jda at his.com> wrote:

>> 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).

Yes, unique value probably the ONLY case when we MAY need performance.

But it is godo always use THE SAME style.

It is bad idea if half of functions errors throw,
But second half reurn them.

Developer will get great headache with mixing of 2 styles

-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list