<?php
/**
 * Database Exception
 *
 * @package AIPT\Core\Exceptions
 * @since 2.4.0
 */

namespace AIPT\Core\Exceptions;

class DatabaseException extends \Exception {

    private $query;

    public function __construct( string $message = '', string $query = '', int $code = 500, ?\Throwable $previous = null ) {
        parent::__construct( $message, $code, $previous );
        $this->query = $query;
    }

    public function getQuery(): string {
        return $this->query;
    }
}
