You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
474 B
PHP
19 lines
474 B
PHP
<?php
|
|
|
|
use jrosset\LastErrorException\LastErrorException;
|
|
|
|
require_once __DIR__ . '/../vendor/autoload.php';
|
|
|
|
try {
|
|
if (!file_put_contents('/test_file', 'Some data')) {
|
|
throw LastErrorException::createFromLastError();
|
|
}
|
|
}
|
|
catch (Throwable $e) {
|
|
fwrite(
|
|
STDERR,
|
|
'EXCEPTION [' . get_class($e) . '] ' . $e->getMessage()
|
|
. PHP_EOL . 'in ' . $e->getFile() . '(' . $e->getLine() . ')'
|
|
. PHP_EOL . $e->getTraceAsString()
|
|
);
|
|
} |