Stackdriver Debugger Client - Class StatusMessage (1.8.8)

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
Name
Description
isError
bool

Distinguishes errors from informational messages.

refersTo
string

Reference to which the message applies.

description

info

Return a serializable version of this object

Returns
Type
Description
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
Name
Description
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
Type
Description

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 
 
Design a Mobile Site
View Site in Mobile | Classic
Share by: