Import Geant4 10.2.0 source tree
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2010, Guy Barrand. All rights reserved.
|
||||
// See the file tools.license for terms.
|
||||
|
||||
#ifndef tools_out_error
|
||||
#define tools_out_error
|
||||
|
||||
#include "snpf"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
namespace tools {
|
||||
|
||||
inline void out_error(std::ostream& a_out,
|
||||
const char* location, const char* fmt,...) {
|
||||
char s[1024];
|
||||
va_list args;
|
||||
va_start(args,fmt);
|
||||
vsnpf(s,sizeof(s),fmt,args);
|
||||
va_end(args);
|
||||
if(location) {
|
||||
a_out << location << " : " << s << std::endl;
|
||||
} else {
|
||||
a_out << s << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user