]> gerrit.simantics Code Review - simantics/3d.git/commitdiff
refs #6656
authorjsimomaa <jsimomaa@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 24 Aug 2016 12:19:16 +0000 (12:19 +0000)
committerjsimomaa <jsimomaa@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Wed, 24 Aug 2016 12:19:16 +0000 (12:19 +0000)
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

org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CollectionAccessor.java
org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/CompoundGetSetValueAccessor.java
org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/GetSetObjectAccessor.java
org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/GetSetValueAccessor.java
org.simantics.objmap2/src/org/simantics/objmap/graph/rules/range/ListAccessor.java
org.simantics.objmap2/src/org/simantics/objmap/graph/schema/DynamicSimpleLinkType.java

index c3569ed4242f78e93cd0007663004299de2413d1..d2b9f8377167b1e04377325c804f4ace83866c87 100644 (file)
@@ -51,7 +51,7 @@ public class CollectionAccessor<Range,T>  implements IRangeAccessor<Range,Collec
                } 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
@@ -83,7 +83,7 @@ public class CollectionAccessor<Range,T>  implements IRangeAccessor<Range,Collec
                } 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
                return removing.size() > 0 || adding.size() > 0;\r
                \r
index 126f1d0428d2d3755dfa652730a3802d4ff92308..7dac5f7f0c352edc38b256d947206846eb2663c9 100644 (file)
@@ -47,7 +47,7 @@ public class CompoundGetSetValueAccessor<Range,T>  implements IRangeAccessor<Ran
                } 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
@@ -65,7 +65,7 @@ public class CompoundGetSetValueAccessor<Range,T>  implements IRangeAccessor<Ran
                } 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
                return true;\r
                \r
index 65808d53ed13d8d10c192aa381e347d837d8541c..befd2fda04bff1707a699f6126954a5838479ebf 100644 (file)
@@ -47,7 +47,7 @@ public class GetSetObjectAccessor<Range,T>  implements IRangeAccessor<Range,T> {
                } 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
@@ -61,7 +61,7 @@ public class GetSetObjectAccessor<Range,T>  implements IRangeAccessor<Range,T> {
                } 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
                return true;\r
                \r
index 6100c9605cb92880d1167c54d7cfc755ed58e967..9f17e7811b87f22f491cad5ad84a0f66be2ba494 100644 (file)
@@ -47,7 +47,7 @@ public class GetSetValueAccessor<Range,T>  implements IRangeAccessor<Range,T> {
                } 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
@@ -65,7 +65,7 @@ public class GetSetValueAccessor<Range,T>  implements IRangeAccessor<Range,T> {
                } 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
                return true;\r
                \r
index 5f79c58568836c3aff430c0f085576d72290baaa..a384235be4021a49be6e3ccec5e66c3155308791 100644 (file)
@@ -52,7 +52,7 @@ public class ListAccessor<Range,T>  implements IRangeAccessor<Range,Collection<T
                } 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
@@ -86,7 +86,7 @@ public class ListAccessor<Range,T>  implements IRangeAccessor<Range,Collection<T
                } 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
                return removing.size() > 0 || adding.size() > 0;\r
                \r
index bc436288809cfb87e51fde91337fb3ae3ebac620..0abd423c9213bc49ab288db9fb2b7130cbc8e5da 100644 (file)
@@ -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