Unverified Commit 916ac27e authored by Stephen Rees's avatar Stephen Rees Committed by GitHub
Browse files

Update README.md

parent 7de1d350
...@@ -16,12 +16,12 @@ $collection_obj = new ZenodoDepositionCollection($connection); ...@@ -16,12 +16,12 @@ $collection_obj = new ZenodoDepositionCollection($connection);
try{ try{
$collection = $collection_obj->list_depositions();//returns an array of deposition objects $collection = $collection_obj->list_depositions();//returns an array of deposition objects
}catch (HttpRuntimeException $e){ }catch (RuntimeException $e){
//you should only have to catch the runtime exception the first time you request data from Zenodo //you should only have to catch the runtime exception the first time you request data from Zenodo
echo $e->getMessage(); echo $e->getMessage();
echo var_export($connection->last_response());//this is where you will find details on any errors echo var_export($connection->last_response());//this is where you will find details on any errors
return; return;
}catch(HttpResponseException $e){ }catch(LogicException $e){
//you should catch a response exception every time you request data from Zenodo. //you should catch a response exception every time you request data from Zenodo.
echo $e->getMessage(); echo $e->getMessage();
echo var_export($connection->last_response()); echo var_export($connection->last_response());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment