michielroos/bugsnag

Bugsnag exception handler

Installs: 2 187

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 1

Open Issues: 0

Type:typo3-cms-extension

12.0 2024-09-02 06:41 UTC

This package is auto-updated.

Last update: 2024-10-02 07:02:56 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.