final class ProgramProblem
    implements Diagnostic
    uses Snapshot
Public API: explicitly declared with @visibility public.

A stored program statement MySQL rejects because it breaks a rule of the language.

Reading the problem of a LEAVE without a label in scopedoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('CREATE PROCEDURE p() LEAVE missing') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\SemanticException: LEAVE with no matching label: missing

Properties§

public ProgramRule $rule
public string|null $subject = null

Methods§

public function __construct(public ProgramRule $rule, public string|null $subject = null)

Parameters

$ruleProgramRuleThe broken rule
$subjectstring|nullThe name the problem is about; given exactly when the message of the rule names one
Calls 2
public function message(): string

Describes the broken rule in the words of the server.

Returns

string
Test cases 3
Calls 1

Test cases 16§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 6
Other tests reaching this symbol 10

Relations§

Instantiated in 37
Type declarations 2