Changeset 2606 in Sophya for trunk/SophyaPI/PIext


Ignore:
Timestamp:
Sep 7, 2004, 9:10:18 AM (21 years ago)
Author:
ansari
Message:

Ajout bloc try/catch ds piacmd.cc (thread execution commandes) et ds pistdimgapp.cc (methode process, thread boucle d'evts) - Reza 07/09/2004

Location:
trunk/SophyaPI/PIext
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/piacmd.cc

    r2536 r2606  
    228228    fg_threxe = true;
    229229    mutx_inps.unlock();
    230     Interpret(line);
     230    try {
     231      Interpret(line);
     232    }
     233    catch (PThrowable& pex) {  // Catching SOPHYA exceptions
     234      cerr << "PIACmd::run() SOPHYA exception in call to Interpret(" << line << ")\n"
     235           << (string)typeid(pex).name() << " Msg= " << pex.Msg() << endl;
     236    }
     237    catch (std::exception& sex) {
     238      cerr << "PIACmd::run() std::exception in call to Interpret(" << line << ")\n"
     239           << (string)typeid(sex).name() << " Msg= " << sex.what() << endl;
     240    }
     241    catch (...) {
     242      cerr << "PIACmd::run() unknown exception (...) in call to Interpret("
     243           << line << ")" << endl;
     244    }
    231245  }
    232246}
  • trunk/SophyaPI/PIext/pistdimgapp.cc

    r2494 r2606  
    490490//printf("SuperDebug: msg=%d Mod=%d  State=%d\n", (int)msg, (int)smm, (int)GetState());
    491491if  ((GetState()) && (msg != mFCMsg)) { PIBeep(); return; }
     492
     493#ifdef SANS_EVOLPLANCK
     494  TRY {
     495#else
     496  try {
     497#endif
    492498
    493499//   Messages active-window
     
    606612            (int)tmsg,(int)msg,(int)smm);
    607613
     614#ifdef SANS_EVOLPLANCK
     615}  CATCH(merr) {
     616  fflush(stdout);
     617  cout << endl;
     618  cerr << endl;
     619  string es = PeidaExc(merr);
     620  cerr << "PIStdImgApp::Process()/  Exception :" << es << " (" << merr << ")" << endl ;
     621  SetReady();
     622  }
     623#else
     624  }
     625  catch ( PThrowable & exc ) {
     626    cerr << "\n PIStdImgApp::Process() SOPHYA Exception :"
     627         << (string)typeid(exc).name() << "\n Msg= "
     628         << exc.Msg() << endl;
     629    SetReady();
     630  }
     631  catch ( std::exception & sex ) {
     632    cerr << "\n PIStdImgApp::Process() std::exception :"
     633         << (string)typeid(sex).name() << "\n msg= "
     634         << sex.what() << endl;
     635    SetReady();
     636  }
     637  catch ( ... ) {
     638    cerr << "\n PIStdImgApp::Process()/  Catched unknown (...) Exception " << endl;
     639    SetReady();
     640  }
     641
     642#endif
    608643
    609644return;
Note: See TracChangeset for help on using the changeset viewer.