From: jsimomaa Date: Wed, 24 Aug 2016 12:19:16 +0000 (+0000) Subject: refs #6656 X-Git-Tag: v1.43.0~280 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=38f565efc8c1ec142439e9624062644c6a803899;p=simantics%2F3d.git refs #6656 Use InvocationTargetException.getCause() in cases where a new exception is constructed to be thrown git-svn-id: https://www.simantics.org/svn/simantics/3d/trunk@33144 ac1ea38d-2e2b-0410-8846-a27921b304fc --- diff --git a/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CollectionAccessor.java b/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CollectionAccessor.java index c3569ed4..d2b9f837 100644 --- a/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CollectionAccessor.java +++ b/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CollectionAccessor.java @@ -51,7 +51,7 @@ public class CollectionAccessor implements IRangeAccessor implements IRangeAccessor 0 || adding.size() > 0; diff --git a/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CompoundGetSetValueAccessor.java b/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CompoundGetSetValueAccessor.java index 126f1d04..7dac5f7f 100644 --- a/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CompoundGetSetValueAccessor.java +++ b/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CompoundGetSetValueAccessor.java @@ -47,7 +47,7 @@ public class CompoundGetSetValueAccessor implements IRangeAccessor implements IRangeAccessor implements IRangeAccessor { } catch (IllegalAccessException e) { throw new MappingException(e); } catch (InvocationTargetException e) { - throw new MappingException(e); + throw new MappingException(e.getCause()); } }; @@ -61,7 +61,7 @@ public class GetSetObjectAccessor implements IRangeAccessor { } catch (IllegalAccessException e) { throw new MappingException(e); } catch (InvocationTargetException e) { - throw new MappingException(e); + throw new MappingException(e.getCause()); } return true; diff --git a/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/GetSetValueAccessor.java b/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/GetSetValueAccessor.java index 6100c960..9f17e781 100644 --- a/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/GetSetValueAccessor.java +++ b/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/GetSetValueAccessor.java @@ -47,7 +47,7 @@ public class GetSetValueAccessor implements IRangeAccessor { } catch (IllegalAccessException e) { throw new MappingException(e); } catch (InvocationTargetException e) { - throw new MappingException(e); + throw new MappingException(e.getCause()); } }; @@ -65,7 +65,7 @@ public class GetSetValueAccessor implements IRangeAccessor { } catch (IllegalAccessException e) { throw new MappingException(e); } catch (InvocationTargetException e) { - throw new MappingException(e); + throw new MappingException(e.getCause()); } return true; diff --git a/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/ListAccessor.java b/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/ListAccessor.java index 5f79c585..a384235b 100644 --- a/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/ListAccessor.java +++ b/org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/ListAccessor.java @@ -52,7 +52,7 @@ public class ListAccessor implements IRangeAccessor implements IRangeAccessor 0 || adding.size() > 0; diff --git a/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/DynamicSimpleLinkType.java b/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/DynamicSimpleLinkType.java index bc436288..0abd423c 100644 --- a/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/DynamicSimpleLinkType.java +++ b/org.simantics.objmap2/src/org/simantics/objmap/graph/schema/DynamicSimpleLinkType.java @@ -86,7 +86,7 @@ public class DynamicSimpleLinkType extends SimpleLinkType{ } catch (IllegalAccessException e) { throw new MappingException(e); } catch (InvocationTargetException e) { - throw new MappingException(e); + throw new MappingException(e.getCause()); } } @@ -117,7 +117,7 @@ public class DynamicSimpleLinkType extends SimpleLinkType{ } catch (IllegalArgumentException e) { throw new MappingException(e); } catch (InvocationTargetException e) { - throw new MappingException(e); + throw new MappingException(e.getCause()); } }