Back to home page

EIC code displayed by LXR

 
 

    


Warning, /include/Geant4/tools/out_error is written in an unsupported language. File is not indexed.

0001 // Copyright (C) 2010, Guy Barrand. All rights reserved.
0002 // See the file tools.license for terms.
0003 
0004 #ifndef tools_out_error
0005 #define tools_out_error
0006 
0007 #include "snpf"
0008 
0009 #include <ostream>
0010 
0011 namespace tools {
0012 
0013 inline void out_error(std::ostream& a_out,
0014                       const char* location, const char* fmt,...) {
0015   char _s[1024];
0016   va_list args;
0017   va_start(args,fmt);
0018   vsnpf(_s,sizeof(_s),fmt,args);
0019   va_end(args);
0020   if(location) {
0021     a_out << location << " : " << _s << std::endl;
0022   } else {
0023     a_out << _s << std::endl;
0024   }
0025 }
0026 
0027 }
0028 
0029 #endif