From 62916b849016cb958e1d2886dff04d4c017e92b4 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 5 Apr 2020 22:08:10 +0200 Subject: [PATCH] Improve exception message of XmppElementUtil.getQNameFor() --- .../java/org/jivesoftware/smack/util/XmppElementUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/XmppElementUtil.java b/smack-core/src/main/java/org/jivesoftware/smack/util/XmppElementUtil.java index 315edfe2c..336e1e21e 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/XmppElementUtil.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/XmppElementUtil.java @@ -1,6 +1,6 @@ /** * - * Copyright 2018-2019 Florian Schmaus + * Copyright 2018-2020 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,7 +49,7 @@ public class XmppElementUtil { namespace = (String) fullyQualifiedElement.getField("NAMESPACE").get(null); } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) { - throw new IllegalArgumentException(e); + throw new IllegalArgumentException("The class" + fullyQualifiedElement + " has no ELEMENT, NAMSEPACE or QNAME member. Consider adding QNAME", e); } return new QName(namespace, element);