From 5b5aab487c93c555311a66b9de92d175fe4cc2e0 Mon Sep 17 00:00:00 2001 From: Madhuram Jajoo Date: Thu, 17 Oct 2024 14:10:44 +0530 Subject: [PATCH] reorder not implemented error messages for dev convenience --- .../android/fhir/sync/upload/UploadStrategy.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engine/src/main/java/com/google/android/fhir/sync/upload/UploadStrategy.kt b/engine/src/main/java/com/google/android/fhir/sync/upload/UploadStrategy.kt index 922e4d08e8..a2d141c688 100644 --- a/engine/src/main/java/com/google/android/fhir/sync/upload/UploadStrategy.kt +++ b/engine/src/main/java/com/google/android/fhir/sync/upload/UploadStrategy.kt @@ -82,12 +82,12 @@ private constructor( squash: Boolean, bundleSize: Int, ): UploadStrategy { - if (!squash) { - throw NotImplementedError("No squashing with bundle uploading not supported yet.") - } if (methodForUpdate == HttpUpdateMethod.PUT) { throw NotImplementedError("PUT for UPDATE not supported yet.") } + if (!squash) { + throw NotImplementedError("No squashing with bundle uploading not supported yet.") + } return UploadStrategy( localChangesFetchMode = LocalChangesFetchMode.AllChanges, patchGeneratorMode = PatchGeneratorMode.PerResource, @@ -122,12 +122,12 @@ private constructor( methodForUpdate: HttpUpdateMethod, squash: Boolean, ): UploadStrategy { - require(methodForUpdate != HttpUpdateMethod.PUT || squash) { - "Http method PUT not supported for UPDATE with squash set as false." - } if (methodForUpdate == HttpUpdateMethod.PUT) { throw NotImplementedError("PUT for UPDATE not supported yet.") } + require(methodForUpdate != HttpUpdateMethod.PUT || squash) { + "Http method PUT not supported for UPDATE with squash set as false." + } return UploadStrategy( localChangesFetchMode = if (squash) LocalChangesFetchMode.PerResource else LocalChangesFetchMode.EarliestChange,