Changeset 12480


Ignore:
Timestamp:
06/20/12 14:47:02 (13 years ago)
Author:
utke
Message:

introduce an alternative to the _error_ macro that uses stream arguments
to avoid having to introduce different calls for active floating point
variables vs regular passive ones

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/include/macros.h

    r12365 r12480  
    66#ifndef _MACROS_H_
    77#define _MACROS_H_
     8
     9#include <sstream>
    810
    911#include "./typedefs.h"
     
    2931  throw ErrorException(__FILE__,__func__,__LINE__,exprintf(__VA_ARGS__))
    3032#endif
     33/*}}}*/
     34/* _error2_ {{{*/
     35/*new Error exception macro*/
     36#define _error2_(StreamArgs)\
     37   {std::ostringstream aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy; \
     38   aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy << StreamArgs << std::ends; \
     39   throw ErrorException(__FILE__,__func__,__LINE__,aLoNgAnDwEiRdLoCaLnAmeFoRtHiSmAcRoOnLy.str());}
    3140/*}}}*/
    3241/* _assert_ {{{*/
Note: See TracChangeset for help on using the changeset viewer.