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/SkyMap/fiolocalmap.cc

    r1624 r1967  
    44#include "pexceptions.h"
    55#include "fiondblock.h"
     6#include "datatype.h"
     7#include <typeinfo>
    68
    79//*******************************************************************
     
    7274{
    7375  LocalMap<T> * po = dynamic_cast< LocalMap<T> * >(&o);
    74   if (po == NULL) return;
     76  if (po == NULL) {
     77    char buff[160];
     78    sprintf(buff,"FIO_LocalMap<%s>::SetDataObj(%s) - Object type  error ! ",
     79            DataTypeInfo<T>::getTypeName().c_str(), typeid(o).name());
     80    throw TypeMismatchExc(PExcLongMessage(buff));   
     81  }
    7582  if (ownobj && dobj) delete dobj;
    7683  dobj = po; ownobj = false;
Note: See TracChangeset for help on using the changeset viewer.