Skip to content

Exceptions are printed to a display #3

@redstar01

Description

@redstar01

Seems wrong using var_dump function. var_dump returns void and only displays structured information

 public function sendMessageRequest($req) {
    $api = new RestClient();
    $api->register_decoder('xml', "Intelecom_Service_SMSGW::xml_decoder");

    $jsonReq = json_encode($req);

    $result = $api->post(
                $this->smsgwUri,
                $jsonReq,
                array('Content-Type' => 'application/json'));

    if($result->info->http_code == 200) {
        return $result->decode_response();
    } else {
      throw new Exception("Request failed: \n" . var_dump($result));
    }
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions