Ignore:
Timestamp:
Apr 26, 2002, 6:48:22 PM (23 years ago)
Author:
ansari
Message:

Ajout throw TypeMismatchExc ds PPersist_X::SetDataObj() ds les differents classes handler PPersist, a place du return simple, lorsque le type d'objet n'etait pas bon ... Reza 26/4/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/fiondblock.cc

    r1426 r1967  
    99#include "pexceptions.h"
    1010#include "fiondblock.h"
     11#include "datatype.h"
     12#include <typeinfo>
    1113
    1214////////////////////////////////////////////////////////////////
     
    7173{
    7274NDataBlock<T> * po = dynamic_cast< NDataBlock<T> * >(&o);
    73 if (po == NULL) throw TypeMismatchExc("FIO_NDataBlock<T>::SetDataObj() - Type Mismatch Error");
     75if (po == NULL) {
     76  char buff[160];
     77  sprintf(buff,"FIO_NDataBlock<T><%s>::SetDataObj(%s) - Object type  error ! ",
     78          DataTypeInfo<T>::getTypeName().c_str(), typeid(o).name());
     79  throw TypeMismatchExc(PExcLongMessage(buff));   
     80}
    7481if (ownobj && dobj) delete dobj;
    7582dobj = po; ownobj = false;
Note: See TracChangeset for help on using the changeset viewer.