Optional. Time when the event occurred. If not provided, the time when the event was received by the Error Reporting system is used. If provided, the time must not exceed the logs retention period in the past, or be more than 24 hours in the future. If an invalid time is provided, then an error is returned.
Required. The service context in which this error has occurred.
↳ message
string
Required. The error message. If no context.reportLocation is provided, the message must contain a header (typically consisting of the exception type name and an error message) and an exception stack trace in one of the supported programming languages and formats. Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. Supported stack trace formats are: * * Java: Must be the return value of Throwable.printStackTrace(). * * Python: Must be the return value of traceback.format_exc(). * * JavaScript: Must be the value of error.stack as returned by V8. * * Ruby: Must contain frames returned by Exception.backtrace. * * C#: Must be the return value of Exception.ToString(). * * PHP: Must be prefixed with "PHP (Notice|Parse error|Fatal error|Warning): " and contain the result of (string)$exception. * * Go: Must be the return value of runtime.Stack().
Optional. A description of the context in which the error occurred.
getEventTime
Optional. Time when the event occurred.
If not provided, the time when the event was received by the
Error Reporting system is used. If provided, the time must not
exceed the logs retention
period in
the past, or be more than 24 hours in the future.
If an invalid time is provided, then an error is returned.
If not provided, the time when the event was received by the
Error Reporting system is used. If provided, the time must not
exceed the logs retention
period in
the past, or be more than 24 hours in the future.
If an invalid time is provided, then an error is returned.
If no context.reportLocation is provided, the message must contain a
header (typically consisting of the exception type name and an error
message) and an exception stack trace in one of the supported programming
languages and formats.
Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.
Supported stack trace formats are:
If no context.reportLocation is provided, the message must contain a
header (typically consisting of the exception type name and an error
message) and an exception stack trace in one of the supported programming
languages and formats.
Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.
Supported stack trace formats are:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Stackdriver Error Reporting V1beta1 Client - Class ReportedErrorEvent (0.23.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.23.1 (latest)](/php/docs/reference/cloud-error-reporting/latest/V1beta1.ReportedErrorEvent)\n- [0.23.0](/php/docs/reference/cloud-error-reporting/0.23.0/V1beta1.ReportedErrorEvent)\n- [0.22.10](/php/docs/reference/cloud-error-reporting/0.22.10/V1beta1.ReportedErrorEvent)\n- [0.21.1](/php/docs/reference/cloud-error-reporting/0.21.1/V1beta1.ReportedErrorEvent)\n- [0.20.2](/php/docs/reference/cloud-error-reporting/0.20.2/V1beta1.ReportedErrorEvent)\n- [0.19.12](/php/docs/reference/cloud-error-reporting/0.19.12/V1beta1.ReportedErrorEvent) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Stackdriver Error Reporting V1beta1 Client class ReportedErrorEvent.\n\nAn error event which is reported to the Error Reporting system.\n\nGenerated from protobuf message `google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ErrorReporting \\\\ V1beta1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getEventTime\n\nOptional. Time when the event occurred.\n\nIf not provided, the time when the event was received by the\nError Reporting system is used. If provided, the time must not\nexceed the [logs retention\nperiod](https://cloud.google.com/logging/quotas#logs_retention_periods) in\nthe past, or be more than 24 hours in the future.\nIf an invalid time is provided, then an error is returned.\n\n### hasEventTime\n\n### clearEventTime\n\n### setEventTime\n\nOptional. Time when the event occurred.\n\nIf not provided, the time when the event was received by the\nError Reporting system is used. If provided, the time must not\nexceed the [logs retention\nperiod](https://cloud.google.com/logging/quotas#logs_retention_periods) in\nthe past, or be more than 24 hours in the future.\nIf an invalid time is provided, then an error is returned.\n\n### getServiceContext\n\nRequired. The service context in which this error has occurred.\n\n### hasServiceContext\n\n### clearServiceContext\n\n### setServiceContext\n\nRequired. The service context in which this error has occurred.\n\n### getMessage\n\nRequired. The error message.\n\nIf no `context.reportLocation` is provided, the message must contain a\nheader (typically consisting of the exception type name and an error\nmessage) and an exception stack trace in one of the supported programming\nlanguages and formats.\nSupported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.\nSupported stack trace formats are:\n\n- **Java** : Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).\n- **Python** : Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).\n- **JavaScript** : Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned by V8.\n- **Ruby** : Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).\n- **C#** : Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).\n- **PHP** : Must be prefixed with `\"PHP (Notice|Parse error|Fatal\n error|Warning): \"` and contain the result of [`(string)$exception`](https://php.net/manual/en/exception.tostring.php).\n- **Go** : Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).\n\n### setMessage\n\nRequired. The error message.\n\nIf no `context.reportLocation` is provided, the message must contain a\nheader (typically consisting of the exception type name and an error\nmessage) and an exception stack trace in one of the supported programming\nlanguages and formats.\nSupported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go.\nSupported stack trace formats are:\n\n- **Java** : Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29).\n- **Python** : Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc).\n- **JavaScript** : Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned by V8.\n- **Ruby** : Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace).\n- **C#** : Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx).\n- **PHP** : Must be prefixed with `\"PHP (Notice|Parse error|Fatal\n error|Warning): \"` and contain the result of [`(string)$exception`](https://php.net/manual/en/exception.tostring.php).\n- **Go** : Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack).\n\n### getContext\n\nOptional. A description of the context in which the error occurred.\n\n### hasContext\n\n### clearContext\n\n### setContext\n\nOptional. A description of the context in which the error occurred."]]