|
Tried your code, no problem
class TPart1
{
public:
void __fastcall Function_1( void)
{
const String Error_Str = "Error Of F1.";
throw (Error_Str );
}
};
class TCombination
{
public:
TCombination( );
void __fastcall Act( void );
};
// *.h
TPart1 *A_Part;
TCombination::TCombination()
{
A_Part = new TPart1( );
}
void __fastcall TCombination::Act( void)
{
try
{
A_Part->Function_1( ); // After the program executes this sentence, it dies.
}
catch( ...)
{
ShowMessage( "Errors Found." );
}
}
int main(int argc, char* argv[])
{
TCombination c;
c.Act();
return 0;
} |
|