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

namespace AIPT\Core\Exceptions;

class AIException extends \Exception {

    private $provider;
    private $raw_response;

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

    public function getProvider(): string {
        return $this->provider;
    }

    public function getRawResponse() {
        return $this->raw_response;
    }
}
