public sealed class SourceLocation : IMessage<SourceLocation>, IEquatable<SourceLocation>, IDeepCloneable<SourceLocation>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Error Reporting v1beta1 API class SourceLocation.
Indicates a location in the source code of the service for which errors are
reported. functionName must be provided by the application when reporting
an error, unless the error report contains a message with a supported
exception stack trace. All fields are optional for the later case.
Human-readable name of a function or method.
The value can include optional context like the class or package name.
For example, my.package.MyClass.method in case of Java.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eSourceLocation\u003c/code\u003e class in the Google Cloud Error Reporting v1beta1 API is used to represent the location in the source code where errors are reported, and it's part of the \u003ccode\u003eGoogle.Cloud.ErrorReporting.V1Beta1\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSourceLocation\u003c/code\u003e implements several interfaces including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from the base \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers two constructors, a default \u003ccode\u003eSourceLocation()\u003c/code\u003e and a \u003ccode\u003eSourceLocation(SourceLocation other)\u003c/code\u003e constructor for creating a copy of an existing instance.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSourceLocation\u003c/code\u003e includes properties like \u003ccode\u003eFilePath\u003c/code\u003e (the source code file path), \u003ccode\u003eFunctionName\u003c/code\u003e (the human-readable name of the function or method), and \u003ccode\u003eLineNumber\u003c/code\u003e (the 1-based line number where the error occurred, with 0 indicating unknown).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eFunctionName\u003c/code\u003e property is required when reporting errors, except when the error report contains a \u003ccode\u003emessage\u003c/code\u003e with a supported exception stack trace, in which case all fields of \u003ccode\u003eSourceLocation\u003c/code\u003e are optional.\u003c/p\u003e\n"]]],[],null,[]]