Ignore:
Timestamp:
Dec 10, 2008, 7:31:39 PM (15 years ago)
Author:
rosiere
Message:

Almost complete design
with Test and test platform

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Common/include/ErrorMorpheo.h

    r82 r88  
    1 #ifndef morpheo_ErrorMorpheo
    2 #define morpheo_ErrorMorpheo
     1#ifndef Morpheo_ErrorMorpheo_h
     2#define Morpheo_ErrorMorpheo_h
    33
    44/*
     
    99 */
    1010
    11 #include "ToString.h"
     11#include "Common/include/ToString.h"
     12#include "Common/include/Translation.h"
     13#include "Common/include/Message.h"
     14
    1215#include <iostream>
    1316#include <exception>
     
    2326   
    2427    // -----[ methods ]---------------------------------------------------
    25   public  :             ErrorMorpheo  ()                throw() {_msg="Exception detected ...";}
    26   public  :             ErrorMorpheo  (std::string msg) throw() {_msg=msg;}
     28  public  :             ErrorMorpheo  ()                throw() {_msg = toString("%s ",MSG_ERROR); _msg+="Exception detected ...";}
     29  public  :             ErrorMorpheo  (std::string msg) throw() {_msg = toString("%s ",MSG_ERROR); _msg+=msg;}
    2730  public  :             ErrorMorpheo  (std::string funcname,
    2831                                       std::string msg     ,
     
    3033                                       std::string file    ) throw()
    3134    {
    32       _msg = toString("<%s> at line %d, in file %s : %s",funcname.c_str(),line,file.c_str(),msg.c_str());
     35#ifdef DEBUG
     36      _msg = toString(_("%s <%s> at line %d, in file %s : %s"),MSG_ERROR,funcname.c_str(),line,file.c_str(),msg.c_str());
     37#else
     38      _msg = toString(_("%s %s"),MSG_ERROR,msg.c_str());
     39#endif
    3340    }
    3441  public  :             ~ErrorMorpheo (void)       throw() {}
     
    4350   
    4451    // -----[ methods ]---------------------------------------------------
    45   public  :             TestMorpheo   ()                throw() {_msg="Test error ...";}
     52  public  :             TestMorpheo   ()                throw() {_msg=_("Test error ...");}
    4653  public  :             TestMorpheo   (std::string msg) throw() {_msg=msg;}
    4754  public  :             ~TestMorpheo  (void)            throw() {}
Note: See TracChangeset for help on using the changeset viewer.