MssqlException.php 308 B

1234567891011
  1. <?php
  2. namespace Safe\Exceptions;
  3. class MssqlException extends \ErrorException implements SafeExceptionInterface
  4. {
  5. public static function createFromPhpError(): self
  6. {
  7. $error = error_get_last();
  8. return new self($error['message'] ?? 'An error occured', 0, $error['type'] ?? 1);
  9. }
  10. }