PHP code example of coretsia / platform-errors

1. Go to this page and download the library: Download coretsia/platform-errors library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

coretsia / platform-errors example snippets


$definitions->classService(
    CliExceptionMapper::class,
    CliExceptionMapper::class,
);

$definitions->tag(
    ReservedTags::ERROR_MAPPER,
    CliExceptionMapper::class,
    priority: 100,
    meta: [],
);

[
    'reporting' => [
        'enabled' => false,
        'min_severity' => 'info',
        'exclude_codes' => [],
        'sample_rate' => 10000,
        'mapper_failures' => [
            'enabled' => false,
        ],
    ],
]
text
invalid_metadata
service_resolution_failed
invalid_service
mapper_failed