feat: VivesPOS landing on Winter CMS 1.2 — theme + plugin + Dockerfile
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
- Base: wintercms/winter branch 1.2 (full framework) - Theme vivespos: Canvas 7 + Bootstrap 5 CDN, custom CSS - Layout: deferred GTM/GA4 tracking, JSON-LD SoftwareApplication - Partials: hero (offline-first), features, modes (offline/nube toggle), screenshots, pricing (3 planes), comparison, FAQ, CTA - Plugin VivesPOS.Site with ContactForm - Dockerfile: PHP 8.2 Apache, port 80, healthcheck - Added winter/wn-pages, blog, sitemap, seo plugins - Active theme set to vivespos
This commit is contained in:
54
modules/backend/traits/ErrorMaker.php
Normal file
54
modules/backend/traits/ErrorMaker.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php namespace Backend\Traits;
|
||||
|
||||
use Exception;
|
||||
use System\Classes\ErrorHandler;
|
||||
use System\Models\EventLog;
|
||||
use Winter\Storm\Exception\ApplicationException;
|
||||
|
||||
/**
|
||||
* Error Maker Trait
|
||||
* Adds exception based methods to a class, goes well with `System\Traits\ViewMaker`.
|
||||
*
|
||||
* @package winter\wn-backend-module
|
||||
* @author Alexey Bobkov, Samuel Georges
|
||||
*/
|
||||
trait ErrorMaker
|
||||
{
|
||||
/**
|
||||
* @var string Object used for storing a fatal error.
|
||||
*/
|
||||
protected $fatalError;
|
||||
|
||||
/**
|
||||
* @return boolean Whether a fatal error has been set or not.
|
||||
*/
|
||||
public function hasFatalError()
|
||||
{
|
||||
return !is_null($this->fatalError);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string The fatal error message
|
||||
*/
|
||||
public function getFatalError()
|
||||
{
|
||||
return $this->fatalError;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets standard page variables in the case of a controller error.
|
||||
*/
|
||||
public function handleError($exception)
|
||||
{
|
||||
if (
|
||||
$exception instanceof Exception
|
||||
&& !($exception instanceof ApplicationException)
|
||||
) {
|
||||
EventLog::addException($exception);
|
||||
}
|
||||
|
||||
$errorMessage = ErrorHandler::getDetailedMessage($exception);
|
||||
$this->fatalError = $errorMessage;
|
||||
$this->vars['fatalError'] = $errorMessage;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user