This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

try-catch block


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]