Skip to content

Commit

Permalink
Add better error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
frankkessler committed Aug 4, 2016
1 parent ad02738 commit e508faf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Salesforce.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,12 @@ protected function call_api($method, $url, $options=[], $debug_info=[]){
return $data;
}
}catch(Exception $e){

$data['message_string'] = $e->getMessage();
$data['file'] = $e->getFile().':'.$e->getLine();
$data['http_status'] = 500;
$data['success'] = false;
$data = array_merge($debug_info,$data);
return $data;
}
return [];
}
Expand Down

0 comments on commit e508faf

Please sign in to comment.