Listing 5: The generated code for the AOP specification

MyClass::myFunc()
{
  try {
    LogRecord lrecWATCH1(INFO, 1, 2, 53, 16, __LINE__); 
    LogStore::GetInstance()->store(&lrecWATCH1); 
    SomeClass sc;
    .....
  }
  catch( SomethingWentWrongException& e)
  {
    LogRecord lrecERROR1(MAJOR, 1, 11, 54, 16, __LINE__); 
    lrecInsert( lrecERROR1, 14, sc);
    lrecInsert( lrecERROR1, 15, e.string());
    LogStore::GetInstance()->store(&lrecERROR1);
    // other recovery code
  }
}
— End of Listing —