1 |
|
|
#ifndef SRC_NODE_PROCESS_INL_H_ |
2 |
|
|
#define SRC_NODE_PROCESS_INL_H_ |
3 |
|
|
|
4 |
|
|
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS |
5 |
|
|
|
6 |
|
|
#include "node_process.h" |
7 |
|
|
#include "v8.h" |
8 |
|
|
#include "debug_utils-inl.h" |
9 |
|
|
|
10 |
|
|
namespace node { |
11 |
|
|
|
12 |
|
|
// Call process.emitWarning(str), fmt is a snprintf() format string |
13 |
|
|
template <typename... Args> |
14 |
|
34 |
inline v8::Maybe<bool> ProcessEmitWarning(Environment* env, |
15 |
|
|
const char* fmt, |
16 |
|
|
Args&&... args) { |
17 |
|
68 |
std::string warning = SPrintF(fmt, std::forward<Args>(args)...); |
18 |
|
|
|
19 |
|
34 |
return ProcessEmitWarningGeneric(env, warning.c_str()); |
20 |
|
|
} |
21 |
|
|
|
22 |
|
|
} // namespace node |
23 |
|
|
|
24 |
|
|
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS |
25 |
|
|
|
26 |
|
|
#endif // SRC_NODE_PROCESS_INL_H_ |