Logging for showblob
This commit is contained in:
parent
9b08972d64
commit
cdb99be032
|
|
@ -210,7 +210,20 @@ class NinjaMailerJob implements ShouldQueue
|
|||
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
} catch(\ErrorException $e){
|
||||
|
||||
nlog("indeed i am a error exception NinjaMailerJob");
|
||||
|
||||
$message = "Attachment size is too large.";
|
||||
$this->fail();
|
||||
$this->logMailError($message, $this->company->clients()->first());
|
||||
$this->entityEmailFailed($message);
|
||||
$this->cleanUpMailers();
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
nlog("Mailer failed with {$e->getMessage()}");
|
||||
$message = $e->getMessage();
|
||||
|
||||
|
|
|
|||
|
|
@ -248,12 +248,14 @@ class Document extends BaseModel
|
|||
}
|
||||
|
||||
try {
|
||||
$file = base64_encode($image);
|
||||
// $file = base64_encode($image);
|
||||
$file = $image;
|
||||
|
||||
$img = new \Imagick(); //@phpstan-ignore-line
|
||||
$img->readImageBlob($file);
|
||||
$img->setImageCompression(true); //@phpstan-ignore-line
|
||||
$img->setImageCompressionQuality(40);
|
||||
$img->stripImage();
|
||||
|
||||
return $img->getImageBlob();
|
||||
|
||||
|
|
@ -265,6 +267,7 @@ class Document extends BaseModel
|
|||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns boolean based on checks for image.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -346,7 +346,18 @@ class Email implements ShouldQueue
|
|||
$message = null;
|
||||
}
|
||||
|
||||
} catch (\Exception | \RuntimeException $e) {
|
||||
} catch(\ErrorException $e){
|
||||
nlog("indeed i am a error exception Email Class");
|
||||
$message = "Attachment size is too large.";
|
||||
$this->fail();
|
||||
$this->logMailError($message, $this->company->clients()->first());
|
||||
$this->cleanUpMailers();
|
||||
|
||||
$this->entityEmailFailed($message);
|
||||
|
||||
return;
|
||||
}
|
||||
catch (\Exception | \RuntimeException $e) {
|
||||
nlog("Mailer failed with {$e->getMessage()}");
|
||||
$message = $e->getMessage();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue