RAD Studio
ContentsIndex
PreviousUpNext
E2457: Delphi style classes must be caught by reference (C++)

You can only catch a Delphi style object by pointer. 

 

void foo(TObject *p)
{
     try
     {
          throw(p);
     }
     catch    (TObject o)    // Error
     {
     }
     catch  (TObject *op)    // OK
     {
     }
}
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!