]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
ReflectionAdapter2 does not handle all Throwables 33/233/2
authorjsimomaa <jani.simomaa@gmail.com>
Wed, 28 Dec 2016 14:05:48 +0000 (16:05 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Wed, 28 Dec 2016 14:56:21 +0000 (16:56 +0200)
ReflectionAdapter2.adapt() does not catch all throwables (e.g.
NoClassDefFoundError) enabling the possibility that the throwable is not
shown to the developer in any manner (console or log)

refs #6898

Change-Id: I32388ebcb23233210c2e54f8530f7e8c626f28de

bundles/org.simantics.db.services/src/org/simantics/db/services/adaption/reflection/ReflectionAdapter2.java

index f8ec0f81a7f11dc05d102d81ce7ef2feeccdaf34..ae76dac4750530e2c783a2aba1474b795105fc56 100644 (file)
@@ -104,6 +104,9 @@ public class ReflectionAdapter2<T> implements Adapter<T, Resource> {
                                } catch (DatabaseException e) {\r
                         procedure.exception(graph, e);\r
                                        e.printStackTrace();\r
                                } catch (DatabaseException e) {\r
                         procedure.exception(graph, e);\r
                                        e.printStackTrace();\r
+                               } catch (Throwable t) {\r
+                                   procedure.exception(graph, t);\r
+                                   t.printStackTrace();\r
                                }\r
                 }\r
                 \r
                                }\r
                 }\r
                 \r