Stackdriver Debugger Client - Class StatusMessage (1.5.1)

Reference documentation and code samples for the Stackdriver Debugger Client class StatusMessage.

Represents a contextual status message. The message can indicate an error or informational status, and refer to specific parts of the containing object.

For example, the Breakpoint.status field can indicate an error referring to the BREAKPOINT_SOURCE_LOCATION with the message Location not found.

Example:

use Google\Cloud\Debugger\FormatMessage;
use Google\Cloud\Debugger\StatusMessage;

$format = new FormatMessage('message with placeholders', ['additional parameter']);
$message = new StatusMessage(true, StatusMessage::REFERENCE_UNSPECIFIED, $format);

Namespace

Google \ Cloud \ Debugger

Methods

__construct

Instantiate a new StatusMessage

Parameters
NameDescription
isError bool

Distinguishes errors from informational messages.

refersTo string

Reference to which the message applies.

description Google\Cloud\Debugger\FormatMessage

Status message text.

info

Return a serializable version of this object

Returns
TypeDescription
array

static::fromJson

Load a StatusMessage from JSON form

Example:

$message = StatusMessage::fromJson([
    'isError' => true,
    'refersTo' => StatusMessage::REFERENCE_UNSPECIFIED,
    'description' => [
        'format' => 'message with placeholders',
        'parameters' => []
    ]
]);
Parameters
NameDescription
data array

StatusMessage data

↳ isError bool

Distinguishes errors from informational messages.

↳ refersTo Reference

Reference to which the message applies.

↳ description FormatMessage

Status message text.

Returns
TypeDescription
Google\Cloud\Debugger\StatusMessage|null

Constants

REFERENCE_UNSPECIFIED

Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::UNSPECIFIED

REFERENCE_BREAKPOINT_SOURCE_LOCATION

Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::BREAKPOINT_SOURCE_LOCATION

REFERENCE_BREAKPOINT_CONDITION

Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::BREAKPOINT_CONDITION

REFERENCE_BREAKPOINT_EXPRESSION

Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::BREAKPOINT_EXPRESSION

REFERENCE_BREAKPOINT_AGE

Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::BREAKPOINT_AGE

REFERENCE_VARIABLE_NAME

Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::VARIABLE_NAME

REFERENCE_VARIABLE_VALUE

Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::VARIABLE_VALUE