.


:




:

































 

 

 

 


,




, , destructible

, , , .,

, , , , ,


24. .

:

try {

throw new std::exception("");

} catch(...) {

...

}

- , std::exception, , .

+ tryfinally, .

Object *p = new Object();

try{

...

}catch(...){

delete p;

throw;

}

deletep;

++ delete , , . , , , , . , , . , wrapper ( , ). , , .


 

25. , .

() throw, , :

throw [ ];

, throw, . , . , try -, , .

, , . , throw .

, Exception.

"Exception". , .

:

using namespace System;

 

public ref class EmployeeListNotFoundException: Exception

{

public:

EmployeeListNotFoundException()

{

}

EmployeeListNotFoundException(String^ message)

: Exception(message)

{

}

EmployeeListNotFoundException(String^ message, Exception^ inner)

: Exception(message, inner)

{

}

};

 


 

26. , .

: .

, , ( ) . , - .

, , .

, , . , Delphi ( overload).

, . .


27. .





:


: 2016-07-29; !; : 476 |


:

:

,
==> ...

1668 - | 1542 -


© 2015-2024 lektsii.org - -

: 0.011 .