Attempt to catch errors creating address for dovenet mail
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
@@ -468,8 +469,8 @@ class Address extends Model
|
||||
try {
|
||||
$so->addresses()->save($o);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error(sprintf('%s:! ERROR creating address [%s]',self::LOGKEY,get_class($e)));
|
||||
} catch (QueryException $e) {
|
||||
Log::error(sprintf('%s:! ERROR creating address [%s] (%s)',self::LOGKEY,$o->ftn,get_class($e)));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user