<?php
/**
 * Service exception for PDFDraft.
 *
 * @package PDFDraft
 */

namespace PDFDraft\Exceptions;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

/**
 * Base exception for service layer errors.
 */
class ServiceException extends \Exception {

	// phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found -- Provides default HTTP status code 500.
	/**
	 * Constructor.
	 *
	 * @param string          $message  Exception message.
	 * @param int             $code     Exception code.
	 * @param \Throwable|null $previous Previous exception.
	 */
	public function __construct( string $message = '', int $code = 500, ?\Throwable $previous = null ) { // phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod.Found -- provides default values
		parent::__construct( $message, $code, $previous );
	}
}
