Skip to content

Conversation

@Gautam-aman
Copy link

What I changed :
Added overloaded constructors for DuplicateQueueEntryException:
With Throwable cause for exception chaining.
With patientId and queueId for more context.
With i18n message codes and parameters for localization support.
Introduced optional fields (patientId, queueId) to provide structured debugging information.
Added Javadoc for clarity and maintainability.
Updated to use modern @serial annotation for serialVersionUID.

Why I changed it:
Makes error handling more flexible and informative.
Supports OpenMRS internationalization standards (messages.properties).
Improves developer experience by providing context directly in the exception.
Aligns with modern Java practices.

How to test:
Try to add the same patient twice to the same queue.
Catch the thrown DuplicateQueueEntryException.

Verify that:
The exception contains the patient ID and queue ID.
Localized error messages are displayed when using the i18n constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant