orisai/exceptions

Exceptions designed for static analysis and easy usage

1.1.4 2024-06-20 20:47 UTC

This package is auto-updated.

Last update: 2024-10-21 08:49:51 UTC


README

Orisai
Exceptions

Exceptions designed for static analysis and easy usage

📄 Check out our documentation.

💸 If you like Orisai, please make a donation. Thank you!

use Orisai\Exceptions\Logic\InvalidState;
use Orisai\Exceptions\Message;

$message = Message::create()
    ->withContext('Trying to commit an import.')
    ->withProblem('There is nothing to commit.')
    ->withSolution('Check that the import files are not empty, and that filters are not too restrictive.');

throw InvalidState::create()
    ->withMessage($message);

... and more.