diff --git a/app/src/org/commcare/android/database/user/models/FormRecord.java b/app/src/org/commcare/android/database/user/models/FormRecord.java index 4c0095ace9..5404e616e0 100755 --- a/app/src/org/commcare/android/database/user/models/FormRecord.java +++ b/app/src/org/commcare/android/database/user/models/FormRecord.java @@ -430,18 +430,18 @@ private FormRecord updateAndWriteRecord() this, CommCareApplication.instance().getUserStorage(FormRecord.class)); } catch (InvalidStructureException e1) { e1.printStackTrace(); - throw new InvalidStateException("Invalid data structure found while parsing form. There's something wrong with the application structure, please contact your supervisor."); + throw new InvalidStateException("Invalid data structure found while parsing form. There's something wrong with the application structure, please contact your supervisor", e1); } catch (XmlPullParserException | IOException e) { e.printStackTrace(); - throw new InvalidStateException("There was a problem with the local storage and the form could not be read."); + throw new InvalidStateException("There was a problem with the local storage and the form could not be read.", e); } catch (UnfullfilledRequirementsException e) { throw new RuntimeException(e); } } private static class InvalidStateException extends Exception { - public InvalidStateException(String message) { - super(message); + public InvalidStateException(String message, Throwable e) { + super(message, e); } }