[VSDK] kFBL_AssertionNULL exception
Eric Forget
forgete at cafederic.com
Tue Nov 25 23:51:29 CST 2003
Hi Ruslan,
I've lost a few hours to figure out why Valentina was throwing
kFBL_AssertionNULL.
1) kFBL_AssertionNULL is completely meaningless to the user (of the API).
You should try to figure better name of the exception (at least for v2).
2) The problem was caused because I wrote something like this:
mTable.mField1 = mTable.Field2;
Both were VDK_String. You have not overloaded the operator= (const
VDK_String &), so it was a copy, byte by byte, that was happening. Since you
are making an API, not just some classes for you, you should either:
a) Declare the operator as private to prohibit its usage
b) Implement it inline, which should be fairly easy:
FBL_EXP virtual void operator= ( const VDK_String & inValue )
{
*this = (const char *)inValue;
}
And that for each of the fields.
Thanks,
Éric
___________________________________________________________________
Eric Forget Cafederic
ForgetE at cafederic.com <http://www.cafederic.com/>
Fingerprint <86D5 38F5 E1FD 5D9C 71C3 BAA3 797E 70A4 6210 C684>
More information about the Valentina
mailing list