Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-10494

remove core-error error handling from api

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.2.0
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      test coverage has higlighted error handling in the api that is never invoked. Core Errors are never raised because the API uses it's own throw catch which by-passes them

      So for clarity we need to remove core_error handling

      if (is_a($eventBAO, 'CRM_Core_Error'))

      { return civicrm_api3_create_error("Event is not created"); }

      else

      { $event = array(); _civicrm_api3_object_to_array($eventBAO, $event[$eventBAO->id]); }

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: