g4tools
5.4.0
g4tools
tools
out_error
Go to the documentation of this file.
1
// Copyright (C) 2010, Guy Barrand. All rights reserved.
2
// See the file tools.license for terms.
3
4
#ifndef tools_out_error
5
#define tools_out_error
6
7
#include "
snpf
"
8
9
#include <ostream>
10
11
namespace
tools
{
12
13
inline
void
out_error
(std::ostream& a_out,
14
const
char
* location,
const
char
* fmt,...) {
15
char
s[1024];
16
va_list
args
;
17
va_start(
args
,fmt);
18
vsnpf
(s,
sizeof
(s),fmt,
args
);
19
va_end(
args
);
20
if
(location) {
21
a_out << location <<
" : "
<< s << std::endl;
22
}
else
{
23
a_out << s << std::endl;
24
}
25
}
26
27
}
28
29
#endif
snpf
tools::args
Definition:
args:24
tools::out_error
void out_error(std::ostream &a_out, const char *location, const char *fmt,...)
Definition:
out_error:13
tools::vsnpf
int vsnpf(char *a_s, size_t a_n, const char *a_fmt, va_list args)
Definition:
snpf:12
tools
inlined C code : ///////////////////////////////////
Definition:
aida_ntuple:26
Generated by
1.8.20