Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4696

SaveOrder method should throw more meaningful exceptions

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • Core 2.1.0
    • None
    • Low

    Description

      In the new Order Entry API, the Order Service API method provides several validation checks--for example, not allowing two active orders for the same orderable and care setting, cannot edit an existing order, etc...

      However, in each case a standard OpenMRS API exception is thrown, with the error message hard-coded in English text.

      In order to allow consumers of this API to take custom actions on an error, such as displaying a localized error message, the API should throw new, targeted exceptions such as "DuplicateActiveOrder" that extend APIException.

      burke darius Thoughts?

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                sashu2014 Sam Shuster [X] (Inactive)
                mogoodrich Mark Goodrich
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: