Changeset 2505 in Sophya for trunk/SophyaLib/BaseTools


Ignore:
Timestamp:
Mar 15, 2004, 5:46:20 PM (22 years ago)
Author:
ansari
Message:

Ajout constructeur exceptions avec char * msg - MAJ numero de version - Reza 15/03/2004

Location:
trunk/SophyaLib/BaseTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/BaseTools/pexceptions.h

    r1607 r2505  
    2828    //! Constructor with the message and error-id (optional) specification
    2929    explicit PThrowable(const string& m, int ident=0)
     30      : msg(m), id(ident) {}
     31    explicit PThrowable(const char* m, int ident=0)
    3032      : msg(m), id(ident) {}
    3133    virtual ~PThrowable() { }
     
    4850  public:
    4951    explicit PError(const string& m, int id=0) : PThrowable(m,id) {}
     52    explicit PError(const char* m, int id=0) : PThrowable(m,id) {}
    5053  };
    5154 
     
    6972  public:
    7073    explicit AllocationError(const string& m, int id=0) : PError(m,id) {}
     74    explicit AllocationError(const char* m, int id=0) : PError(m,id) {}
    7175  };
    7276 
     
    7680  public:
    7781    explicit NullPtrError(const string& m, int id=0) : PError(m,id) {}
     82    explicit NullPtrError(const char* m, int id=0) : PError(m,id) {}
    7883  };
    7984 
     
    8489  public:
    8590    explicit ForbiddenError(const string& m, int id=0) : PError(m,id) {}
     91    explicit ForbiddenError(const char* m, int id=0) : PError(m,id) {}
    8692  };
    8793
     
    9298  public:
    9399    explicit AssertionFailedError(const string& m, int id=0) : PError(m,id) {}
     100    explicit AssertionFailedError(const char* m, int id=0) : PError(m,id) {}
    94101  };
    95102 
     
    114121  public:
    115122    explicit IOExc(const string& m, int id=0) : PException(m,id) {}
     123    explicit IOExc(const char* m, int id=0) : PException(m,id) {}
    116124  };
    117125
     
    121129  public:
    122130    explicit FileFormatExc(const string& m, int id=0) : IOExc(m,id) {}
     131    explicit FileFormatExc(const char* m, int id=0) : IOExc(m,id) {}
    123132  };
    124133
     
    128137  public:
    129138    explicit SzMismatchError(const string& m, int id=0) : PException(m,id) {}
     139    explicit SzMismatchError(const char* m, int id=0) : PException(m,id) {}
    130140  };
    131141 
     
    135145  public:
    136146    explicit RangeCheckError(const string& m, int id=0) : PException(m,id) {}
     147    explicit RangeCheckError(const char* m, int id=0) : PException(m,id) {}
    137148  };
    138149 
     
    142153  public:
    143154    explicit ParmError(const string& m, int id=0) : PException(m,id) {}
     155    explicit ParmError(const char* m, int id=0) : PException(m,id) {}
    144156  };
    145157
     
    149161  public:
    150162    explicit NotAvailableOperation(const string& m, int id=0) : PException(m,id) {}
     163    explicit NotAvailableOperation(const char* m, int id=0) : PException(m,id) {}
    151164  };
    152165
     
    156169  public:
    157170    explicit TypeMismatchExc(const string& m, int id=0) : PException(m,id) {}
     171    explicit TypeMismatchExc(const char* m, int id=0) : PException(m,id) {}
    158172  };
    159173
     
    163177  public:
    164178    explicit MathExc(const string& m, int id=0) : PException(m,id) {}
     179    explicit MathExc(const char* m, int id=0) : PException(m,id) {}
    165180  };
    166181 
     
    170185  public:
    171186    explicit SingMatrixExc(const string& m, int id=0) : MathExc(m,id) {}
     187    explicit SingMatrixExc(const char* m, int id=0) : MathExc(m,id) {}
    172188  };
    173189
     
    177193  public:
    178194    explicit DuplicateIdExc(const string& m, int id=0) : PException(m,id) {}
     195    explicit DuplicateIdExc(const char* m, int id=0) : PException(m,id) {}
    179196  };
    180197 
     
    184201  public:
    185202    explicit NotFoundExc(const string& m, int id=0) : PException(m,id) {}
     203    explicit NotFoundExc(const char* m, int id=0) : PException(m,id) {}
    186204  };
    187205 
     
    191209  public:
    192210    explicit CaughtSignalExc(const string& m, int id=0) : PException(m,id) {}
    193   };
     211    explicit CaughtSignalExc(const char* m, int id=0) : PException(m,id) {}
     212 };
    194213   
    195214} // namespace SOPHYA
     
    209228// Compatibility with EROS-PEIDA exceptions
    210229
    211 #define EXC_ABORT_NEG(_x)
    212 #define EXC_ABORT_ALL(_x)
    213 
    214 
    215 #define END_CONSTRUCTOR
    216230
    217231#define TRY try
     
    226240#define THROW_SAME throw;
    227241
    228 #define RETURN(x) return(x)
    229 #define RETURN_ return
    230 
    231 #define rangeCheckErr    RangeCheckError("")
    232 #define typeMismatchErr  TypeMismatchExc("")
    233 #define allocationErr    AllocationError("")
    234 #define parmErr          ParmError("")
    235 #define inconsistentErr  ParmError("")
    236 #define sizeMismatchErr  SzMismatchError("")
    237 #define fileErr          IOExc("")
    238 #define nullPtrErr       NullPtrError("")
    239 #define singMatxErr      SingMatrixExc("")
    240242
    241243#define DBASSERT(_x_) ASSERT(_x_)
  • trunk/SophyaLib/BaseTools/sversion.h

    r2485 r2505  
    33
    44#define SOPHYA_VERSION   1.8
    5 #define SOPHYA_REVISION  4
    6 #define SOPHYA_TAG       "V_Dec2003"
     5#define SOPHYA_REVISION  6
     6#define SOPHYA_TAG       "V_Fev2003"
    77
    88#endif
Note: See TracChangeset for help on using the changeset viewer.