Show / Hide Table of Contents

Class GoogleApiException

Represents an exception thrown by an API Service.

Inheritance
object
Exception
GoogleApiException
Implements
ISerializable
Inherited Members
Exception.GetBaseException()
Exception.GetObjectData(SerializationInfo, StreamingContext)
Exception.GetType()
Exception.Data
Exception.HelpLink
Exception.HResult
Exception.InnerException
Exception.Source
Exception.StackTrace
Exception.TargetSite
Exception.SerializeObjectState
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Google
Assembly: Google.Apis.Core.dll
Syntax
public class GoogleApiException : Exception, ISerializable

Constructors

GoogleApiException(string)

Creates an API Service exception with no message.

Declaration
public GoogleApiException(string serviceName)
Parameters
Type Name Description
string serviceName
Remarks

Message may still contain useful information if the Error and/or HttpStatusCode properties are set.

GoogleApiException(string, string)

Creates an API Service exception.

Declaration
public GoogleApiException(string serviceName, string message)
Parameters
Type Name Description
string serviceName
string message

GoogleApiException(string, string, Exception)

Creates an API Service exception.

Declaration
public GoogleApiException(string serviceName, string message, Exception inner)
Parameters
Type Name Description
string serviceName
string message
Exception inner

Properties

Error

The Error which was returned from the server, or null if unavailable.

Declaration
public RequestError Error { get; set; }
Property Value
Type Description
RequestError

HttpStatusCode

The HTTP status code which was returned along with this error, or 0 if unavailable.

Declaration
public HttpStatusCode HttpStatusCode { get; set; }
Property Value
Type Description
HttpStatusCode

Message

Declaration
public override string Message { get; }
Property Value
Type Description
string
Overrides
Exception.Message

ServiceName

Gets the service name which related to this exception.

Declaration
public string ServiceName { get; }
Property Value
Type Description
string

Methods

ToString()

Returns a summary of this exception.

Declaration
public override string ToString()
Returns
Type Description
string

A summary of this exception.

Overrides
Exception.ToString()

Implements

ISerializable

Extension Methods

Utilities.ThrowIfNull<T>(T, string)
In this article
Back to top Generated by DocFX