]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - org.argeo.slc.core/src/main/java/org/argeo/slc/core/UnsupportedException.java
Replace test result id by UUID
[gpl/argeo-slc.git] / org.argeo.slc.core / src / main / java / org / argeo / slc / core / UnsupportedException.java
index 76f6565d2870306a96dcd9b5e317d6fc036a290a..4b46b35de3c47ed8eecb6e9b1541cb7bb9468097 100644 (file)
@@ -23,7 +23,20 @@ public class UnsupportedException extends SlcException {
         *            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