michielroos/bugsnag

Bugsnag exception handler

Installs: 2 176

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 0

Open Issues: 0

Type:typo3-cms-extension

v11.0 2023-10-30 12:22 UTC

This package is auto-updated.

Last update: 2024-04-18 15:42:00 UTC


README

Bugsnag exception handlers, send exceptions to bugsnag

Configuration

General exceptions

Configure the Bugsnag API key in the TYPO3 extension configuration screen or make it availabe in your environment as BUGSNAG_API_KEY.

Set the exceptionhandlers to use the Bugsnag exception handlers either using the install tool or by specifying them in AdditionalConfiguration.php.

<?php
# AdditionalConfiguration.php

$GLOBALS['TYPO3_CONF_VARS']['SYS']['debugExceptionHandler'] = \MichielRoos\Bugsnag\Core\Error\DebugExceptionHandler::class;
$GLOBALS['TYPO3_CONF_VARS']['SYS']['productionExceptionHandler'] = \MichielRoos\Bugsnag\Core\Error\ProductionExceptionHandler::class;

Exceptions thrown by content elements

The content exception handler can be specified in TypoScript. Exceptions which occur during rendering of content objects (typically plugins) will be caught by default in production context and an error message is shown along with the rendered output.

The page will remain available while the section of the page that produces an error (i.e. throws an exception) will show a configurable error message. By default this error message contains a random code which references the exception and is also logged by the logging framework for developer reference.

# Use 1 for the default exception handler (enabled by default in production context)
config.contentObjectExceptionHandler = 1

# Use a class name for individual exception handlers
config.contentObjectExceptionHandler = MichielRoos\Bugsnag\ContentObject\Exception\ProductionExceptionHandler

Issues

Please report issues you find.