]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.objmap2/src/org/simantics/objmap/graph/schema/DynamicSimpleLinkType.java
Use unique names at the model scope instead of pipe run
[simantics/3d.git] / org.simantics.objmap2 / src / org / simantics / objmap / graph / schema / DynamicSimpleLinkType.java
index 4205f2c4535fd933f89ca55ebf2b842b1d5890cf..0abd423c9213bc49ab288db9fb2b7130cbc8e5da 100644 (file)
@@ -69,7 +69,7 @@ public class DynamicSimpleLinkType<Range> extends SimpleLinkType<Range>{
     public Resource createDomainElement(WriteGraph g, Range rangeElement)\r
             throws MappingException {\r
         try {\r
-               String typeUri = (String)typeGetter.invoke(rangeElement, null);\r
+               String typeUri = (String)typeGetter.invoke(rangeElement, (Object[]) null);\r
             if(LOGGER.isInfoEnabled())\r
                 LOGGER.info("SimpleLinkType.createDomainElement " +\r
                         rangeElement.toString()\r
@@ -86,7 +86,7 @@ public class DynamicSimpleLinkType<Range> extends SimpleLinkType<Range>{
                } catch (IllegalAccessException e) {\r
                         throw new MappingException(e);\r
                } catch (InvocationTargetException e) {\r
-                        throw new MappingException(e);\r
+                        throw new MappingException(e.getCause());\r
                }\r
     }\r
        \r
@@ -117,7 +117,7 @@ public class DynamicSimpleLinkType<Range> extends SimpleLinkType<Range>{
                        } catch (IllegalArgumentException e) {\r
                                throw new MappingException(e);\r
                        } catch (InvocationTargetException e) {\r
-                               throw new MappingException(e);\r
+                               throw new MappingException(e.getCause());\r
                        } \r
            }\r
 \r