[Clam-devel] Error Handling with Types

Francisco Tufró nictuku at gmail.com
Tue May 20 16:02:36 PDT 2008


Hi, i have almost finished the Link test.
I have this question:
How do i (or what do i do to) handle errors with these functions, in the
first what should i do? make the function bool and return true if it was
connected?? or throw something with a special error class that i ignore?

       void BaseTypedOutControl::Link(BaseTypedInControl& in)
       {
               if(IsLinkable(in)){
                       DoTypedLink(in);
               }
               /* Throw error with else! ? */
       }

and:

    template<class TypedControlData>
    void TypedOutControl<TypedControlData>::DoTypedLink(BaseTypedInControl&
in)
    {
        AddLink(dynamic_cast< ProperTypedInControl& >(in));
    }

by the way i send the patch so you have the full code.
bye!
Francisco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080520/bafa1a07/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typed_controls_v6_AbstractClases.patch
Type: application/octet-stream
Size: 3487 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080520/bafa1a07/attachment-0003.obj>


More information about the clam-devel mailing list