WordPress at a glance
function is not described

PHPMailer\PHPMailer

SMTP::setError() protected WP 1.0

Set error messages and codes.

{} It's a method of the class: SMTP{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->setError( $message, $detail, $smtp_code, $smtp_code_ex );
$message(string) (required)
The error message
$detail(string)
Further detail on the error
$smtp_code(string)
An associated SMTP error code
$smtp_code_ex(string)
Extended SMTP code

Code of SMTP::setError() WP 5.7.2

<?php
protected function setError($message, $detail = '', $smtp_code = '', $smtp_code_ex = '')
{
    $this->error = [
        'error' => $message,
        'detail' => $detail,
        'smtp_code' => $smtp_code,
        'smtp_code_ex' => $smtp_code_ex,
    ];
}