From: Keith Packard Date: Fri, 17 Jun 2016 15:26:31 +0000 (-0700) Subject: altoslib: Add back some JSON exception debugging printfs X-Git-Tag: 1.6.4~1^2~3 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=e8250fcb267a34fbbd8b88c6dcc8eec419bbcc68 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 --- 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()); } } }