Merge "Adding more detailed message to thrown exceptions in SyncElementFactory"
authorJani Simomaa <jani.simomaa@vtt.fi>
Wed, 28 Dec 2016 14:16:34 +0000 (16:16 +0200)
committerGerrit Code Review <gerrit2@www.simantics.org>
Wed, 28 Dec 2016 14:16:34 +0000 (16:16 +0200)
bundles/org.simantics.diagram/src/org/simantics/diagram/adapter/SyncElementFactory.java

index be03b91256295349d1f954e4900a47b2f3eb056d..7087e70c446160e33a3e3e4ae5fa2038579592f6 100644 (file)
@@ -57,7 +57,7 @@ public class SyncElementFactory extends ElementFactoryAdapter {
 \r
     public ElementClass create(ReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementType)\r
     throws DatabaseException {\r
-        throw new UnsupportedOperationException();\r
+        throw new UnsupportedOperationException("This method should be implemented by subclass " + getClass().getName());\r
     }\r
     \r
     public boolean isOk(ReadGraph graph, Resource elementResource) throws DatabaseException {\r
@@ -66,7 +66,7 @@ public class SyncElementFactory extends ElementFactoryAdapter {
 \r
     public void load(ReadGraph graph, ICanvasContext canvas, IDiagram diagram, Resource elementResource, IElement element)\r
     throws DatabaseException {\r
-        throw new UnsupportedOperationException();\r
+        throw new UnsupportedOperationException("This method should be implemented by subclass " + getClass().getName());\r
     }\r
 \r
 }\r