tw: catch exeption not error
Signed-off-by: Varun Patil <varunpatil@ucla.edu>pull/579/head
parent
db559e19f7
commit
9ab896989f
|
@ -37,14 +37,14 @@ trait TimelineWritePlaces
|
||||||
if ($lat || $lon || $oldLat || $oldLon) {
|
if ($lat || $lon || $oldLat || $oldLon) {
|
||||||
try {
|
try {
|
||||||
$mapCluster = $this->mapGetCluster($mapCluster, $lat, $lon, $oldLat, $oldLon);
|
$mapCluster = $this->mapGetCluster($mapCluster, $lat, $lon, $oldLat, $oldLon);
|
||||||
} catch (\Error $e) {
|
} catch (\Exception $e) {
|
||||||
$logger = \OC::$server->get(LoggerInterface::class);
|
$logger = \OC::$server->get(LoggerInterface::class);
|
||||||
$logger->log(3, 'Error updating map cluster data: '.$e->getMessage(), ['app' => 'memories']);
|
$logger->log(3, 'Error updating map cluster data: '.$e->getMessage(), ['app' => 'memories']);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$osmIds = $this->updatePlacesData($fileId, $lat, $lon);
|
$osmIds = $this->updatePlacesData($fileId, $lat, $lon);
|
||||||
} catch (\Error $e) {
|
} catch (\Exception $e) {
|
||||||
$logger = \OC::$server->get(LoggerInterface::class);
|
$logger = \OC::$server->get(LoggerInterface::class);
|
||||||
$logger->log(3, 'Error updating places data: '.$e->getMessage(), ['app' => 'memories']);
|
$logger->log(3, 'Error updating places data: '.$e->getMessage(), ['app' => 'memories']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue