Changeset 1953 in Sophya for trunk/SophyaLib/TArray


Ignore:
Timestamp:
Mar 28, 2002, 2:09:56 PM (24 years ago)
Author:
ansari
Message:

protection/lancement exception ds FIO_TArray<T>::SetDataObj() - Reza 28/3/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/TArray/fioarr.cc

    r1173 r1953  
    77#include "tmatrix.h"
    88#include "tvector.h"
     9#include "datatype.h"
     10#include <typeinfo>
    911
    1012// --------------------------------------------------------
     
    8082{
    8183  TArray<T> * po = dynamic_cast< TArray<T> * >(&o);
    82   if (po == NULL) return;
     84  if (po == NULL) {
     85    char buff[160];
     86    sprintf(buff,"FIO_TArray<%s>::SetDataObj(%s) - Object type  error ! ",
     87            DataTypeInfo<T>::getTypeName().c_str(), typeid(o).name());
     88    throw TypeMismatchExc(PExcLongMessage(buff));   
     89  }
    8390  if (ownobj && dobj) delete dobj;
    8491  dobj = po; ownobj = false;
Note: See TracChangeset for help on using the changeset viewer.