src/includes/classes/Core/Utils/Debugging.php
public function logIssue($data = [], string $note = '', string $event = ''): Exception
    {
        if (func_num_args() === 1 && is_string($data)) {
            $note = $data; // Use data as note.
            $data = []; // Data empty in this case.
        }
        $event = $event ?: $this->traceLogEventTrigger();

        if (mb_strpos($event, '#') === false) {
            $event .= '#issue';
        } // Assume this is an issue.

        $this->maybeLog($data, $note, $event);

        return new Exception($note ? $note : $event);
    }
public function logIssue($data = [], string $note = '', string $event = ''): Exception
    {
        if (func_num_args() === 1 && is_string($data)) {
            $note = $data; // Use data as note.
            $data = []; // Data empty in this case.
        }
        $event = $event ?: $this->traceLogEventTrigger();

        if (mb_strpos($event, '#') === false) {
            $event .= '#issue';
        } // Assume this is an issue.

        $this->maybeLog($data, $note, $event);

        return new Exception($note ? $note : $event);
    }
Log issue & generate exception.

@since 160522 Debugging utilities.

@param mixed  $data  Data to log (e.g., {@link vars()}).
@param string $note  A brief note or description of the issue.
@param string $event Event name (e.g., {@link __METHOD__}).

@return Exception An exception ready to be thrown.

@internal If only one parameter is passed and it's a string, it's treated as the `$note`.