Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-17850

add utility function for converting an exception to a Status

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.1.1
    • Internal Code
    • None
    • Fully Compatible
    • Platform 1 04/03/15

    Description

      i.e. a Lippincott function

      example

      Status myFunc() {
          try {
              funcThatThrows();
              return Status::OK();
          } catch (...) {
             return ExceptionToStatus();
          }
      }
      

      Then ExceptionToStatus() looks like:

      Status ExceptionToStatus() {
          try {
              throw;
          } catch (const DBException& ex) {
             return Status(...)
          } catch (const std::exception& ex) {
              .....
          }
          .....
      }
      

      Attachments

        Activity

          People

            adam.midvidy Adam Midvidy
            adam.midvidy Adam Midvidy
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: