null, $extractOptions, $cache);
if (Files::isEmpty($leftfile)) {
- throw new \Exception('Failed to generate image with ' . json_encode($attributes));
+ $compiler->addIssue(16, ['error' => 'Error while glueing left and right parts', 'uid' => $attributes['id'], 'page' => $attributes['page']]);
+ return null;
}
if ($attributes['page'] % 2 === 0 && ($x + $w) > ($bookwidth + 1) && $compiler->isDoublePage() && $attributes['page'] + 1 <= $compiler->getPageNumber()) {
}
}
if (Files::isEmpty($both)) {
- throw new \Exception('Error glueing ' . $leftfile . ' and ' . $rightfile);
+ $compiler->addIssue(16, ['error' => 'File empty', 'uid' => $attributes['id'], 'page' => $attributes['page']]);
+ return null;
}
} else {
$both = $leftfile;
if (Files::isEmpty($both)) {
- Log::error('Failed generate image ' . json_encode($attributes));
+ $compiler->addIssue(16, ['error' => 'File empty', 'uid' => $attributes['id'], 'page' => $attributes['page']]);
+ return null;
}
$dest = 'data/links/' . $save . '_' . $attributes['id'] . '.' . $ext;
if ($copy) {