From e8250fcb267a34fbbd8b88c6dcc8eec419bbcc68 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 17 Jun 2016 08:26:31 -0700 Subject: [PATCH] altoslib: Add back some JSON exception debugging printfs These make it possible to figure out where the JSON code went wrong. Signed-off-by: Keith Packard --- altoslib/AltosJson.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/altoslib/AltosJson.java b/altoslib/AltosJson.java index 80d83e48..346144d9 100644 --- a/altoslib/AltosJson.java +++ b/altoslib/AltosJson.java @@ -1080,17 +1080,27 @@ public class AltosJson extends JsonUtil { field.set(object, val); } } catch (IllegalAccessException ie) { + System.out.printf("%s:%s %s\n", + c.getName(), fieldName, ie.toString()); } } } ret = object; } catch (InvocationTargetException ie) { + System.out.printf("%s: %s\n", + c.getName(), ie.toString()); ret = null; } catch (NoSuchMethodException ie) { + System.out.printf("%s: %s\n", + c.getName(), ie.toString()); ret = null; } catch (InstantiationException ie) { + System.out.printf("%s: %s\n", + c.getName(), ie.toString()); ret = null; } catch (IllegalAccessException ie) { + System.out.printf("%s: %s\n", + c.getName(), ie.toString()); ret = null; } } @@ -1223,6 +1233,8 @@ public class AltosJson extends JsonUtil { put(fieldName, json); } } catch (IllegalAccessException ie) { + System.out.printf("%s:%s %s\n", + c.getName(), fieldName, ie.toString()); } } } -- 2.30.2