try-catch block

Serguei I. Ivantsov admin@gsc-game.kiev.ua
Tue Aug 27 00:51:00 GMT 2002


Hi!

Please help me to port this code to Linux from M$ (c++)
//...
try{
lock_semaphore();
something_terrible_function();  // can produce any kind of exception
unlock_semaphore();
}catch(...){
unlock_semaphore();
};
// ...


It is important that process must continue execution and unlock semaphore
after any exception in something_terrible_function()

--
 Regards,
  Serguei I. Ivantsov
   GSC Game World



More information about the Gcc mailing list