diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/modifications.cpp')
| -rw-r--r-- | sources/shiboken6/ApiExtractor/modifications.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/modifications.cpp b/sources/shiboken6/ApiExtractor/modifications.cpp index 9e5071a33..e4e9a7d02 100644 --- a/sources/shiboken6/ApiExtractor/modifications.cpp +++ b/sources/shiboken6/ApiExtractor/modifications.cpp @@ -28,6 +28,7 @@ #include "modifications.h" #include "modifications_p.h" +#include "exception.h" #include "typedatabase.h" #include "typeparser.h" #include "typesystem.h" @@ -42,8 +43,11 @@ static inline QString callOperator() { return QStringLiteral("operator()"); } QString TemplateInstance::expandCode() const { TemplateEntry *templateEntry = TypeDatabase::instance()->findTemplate(m_name); - if (!templateEntry) - qFatal("<insert-template> referring to non-existing template '%s'.", qPrintable(m_name)); + if (!templateEntry) { + const QString m = QLatin1String("<insert-template> referring to non-existing template '") + + m_name + QLatin1String("'."); + throw Exception(m); + } QString code = templateEntry->code(); for (auto it = replaceRules.cbegin(), end = replaceRules.cend(); it != end; ++it) |
