be more clear about errors

This commit is contained in:
Alexey Shpakovsky 2021-05-28 23:22:23 +02:00
parent a54c51f954
commit 520458beae
No known key found for this signature in database
GPG key ID: 5797A726A2A4230A

View file

@ -69,7 +69,7 @@ class abook_carddav extends addressbook_backend {
$this->listing = $param['listing']; $this->listing = $param['listing'];
} }
$this->open(true); return $this->open(true);
} }
else { else {
return $this->set_error('Invalid argument to constructor'); return $this->set_error('Invalid argument to constructor');
@ -87,12 +87,10 @@ class abook_carddav extends addressbook_backend {
$discover = new Discovery(); $discover = new Discovery();
$abooks = $discover->discoverAddressbooks($this->account); $abooks = $discover->discoverAddressbooks($this->account);
} catch (\Exception $e) { } catch (\Exception $e) {
// $log->error("!!! Error during addressbook discovery: " . $e->getMessage()); return $this->set_error("!!! Error during addressbook discovery: " . $e->getMessage());
exit(1);
} }
if (count($abooks) <= 0) { if (count($abooks) <= 0) {
// $log->warning("Cannot proceed because no addressbooks were found - exiting"); return $this->set_error("Cannot proceed because no addressbooks were found - exiting");
exit(0);
} }
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
// THE FOLLOWING SHOWS HOW TO PERFORM A SYNCHRONIZATION // // THE FOLLOWING SHOWS HOW TO PERFORM A SYNCHRONIZATION //