Changeset 1967 in Sophya for trunk/SophyaLib/SkyMap/spherepos.cc


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/spherepos.cc

    r764 r1967  
    22
    33#include "spherepos.h"
     4#include "datatype.h"
     5#include <typeinfo>
    46
    5 static char *head_spherepos_cc_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/SkyMap/spherepos.cc,v 1.1.1.1 2000-03-02 17:05:39 ansari Exp $";
     7static char *head_spherepos_cc_ = "$Header: /Users/garnier/temp/CVSSophya/SophyaLib/SkyMap/spherepos.cc,v 1.2 2002-04-26 16:48:22 ansari Exp $";
    68
    79
     
    7274{
    7375  SphereCoordSys * po = dynamic_cast<SphereCoordSys *>(&o);
    74   if (po == NULL) return;
     76  if (po == NULL) {
     77    char buff[160];
     78    sprintf(buff,"FIO_SphereCoordSys::SetDataObj(%s) - Object type  error ! ",
     79            typeid(o).name());
     80    throw TypeMismatchExc(PExcLongMessage(buff));   
     81  }
     82
    7583  if (ownobj && dobj) delete dobj; 
    7684  dobj = po; ownobj = false;
Note: See TracChangeset for help on using the changeset viewer.