* the object itself (its class name will be used in message)\r
*/\r
public UnsupportedException(String nature, Object obj) {\r
- super("Unsupported " + nature + ": " + obj.getClass());\r
+ super("Unsupported " + nature + ": "\r
+ + (obj != null ? obj.getClass() : "[object is null]"));\r
+ }\r
+\r
+ /**\r
+ * Constructor generating a message.\r
+ * \r
+ * @param nature\r
+ * the nature of the unsupported object\r
+ * @param clss\r
+ * the class itself (will be used in message)\r
+ */\r
+ public UnsupportedException(String nature, Class<?> clss) {\r
+ super("Unsupported " + nature + ": " + clss);\r
}\r
\r
/**\r