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 \ DebuggerMethods
__construct
Instantiate a new StatusMessage
| Parameters | |
|---|---|
| Name | Description |
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 | |
|---|---|
| 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 |
Google\Cloud\Debugger\StatusMessage|null |
|
Constants
REFERENCE_UNSPECIFIED
Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::UNSPECIFIEDREFERENCE_BREAKPOINT_SOURCE_LOCATION
Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::BREAKPOINT_SOURCE_LOCATIONREFERENCE_BREAKPOINT_CONDITION
Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::BREAKPOINT_CONDITIONREFERENCE_BREAKPOINT_EXPRESSION
Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::BREAKPOINT_EXPRESSIONREFERENCE_BREAKPOINT_AGE
Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::BREAKPOINT_AGEREFERENCE_VARIABLE_NAME
Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::VARIABLE_NAMEREFERENCE_VARIABLE_VALUE
Value: \Google\Cloud\Debugger\V2\StatusMessage\Reference::VARIABLE_VALUE