summaryrefslogtreecommitdiffstats
path: root/src/tools/tracegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/tracegen')
-rw-r--r--src/tools/tracegen/lttng.cpp3
-rw-r--r--src/tools/tracegen/panic.cpp13
-rw-r--r--src/tools/tracegen/panic.h1
3 files changed, 16 insertions, 1 deletions
diff --git a/src/tools/tracegen/lttng.cpp b/src/tools/tracegen/lttng.cpp
index 1aef1b3d17..e628fbd680 100644
--- a/src/tools/tracegen/lttng.cpp
+++ b/src/tools/tracegen/lttng.cpp
@@ -98,7 +98,8 @@ static void writeCtfMacro(QTextStream &stream, const Tracepoint::Field &field)
<< "ctf_integer(int, height, " << name << ".height()) ";
return;
case Tracepoint::Field::Unknown:
- panic("Cannot deduce CTF type for '%s %s", qPrintable(paramType), qPrintable(name));
+ justified_worry("Cannot deduce CTF type for '%s %s'", qPrintable(paramType),
+ qPrintable(name));
break;
}
}
diff --git a/src/tools/tracegen/panic.cpp b/src/tools/tracegen/panic.cpp
index d1e207764e..ac95b2e9e8 100644
--- a/src/tools/tracegen/panic.cpp
+++ b/src/tools/tracegen/panic.cpp
@@ -57,3 +57,16 @@ void panic(const char *fmt, ...)
exit(EXIT_FAILURE);
}
+
+void justified_worry(const char *fmt, ...)
+{
+ va_list ap;
+
+ fprintf(stderr, "tracegen: warning: ");
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ fputc('\n', stderr);
+}
diff --git a/src/tools/tracegen/panic.h b/src/tools/tracegen/panic.h
index c6b195af00..58e56c0116 100644
--- a/src/tools/tracegen/panic.h
+++ b/src/tools/tracegen/panic.h
@@ -41,5 +41,6 @@
#define PANIC_H
void panic(const char *fmt, ...);
+void justified_worry(const char *fmt, ...);
#endif // PANIC_H