Show / Hide Table of Contents

Class GoogleApiException

Represents an exception thrown by an API Service.

Inheritance
System.Object
System.Exception
GoogleApiException
Implements
System.Runtime.Serialization.ISerializable
Inherited Members
System.Exception.GetBaseException()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Data
System.Exception.HelpLink
System.Exception.HResult
System.Exception.InnerException
System.Exception.Source
System.Exception.StackTrace
System.Exception.TargetSite
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.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
System.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
System.String serviceName
System.String message

GoogleApiException(String, String, Exception)

Creates an API Service exception.

Declaration
public GoogleApiException(string serviceName, string message, Exception inner)
Parameters
Type Name Description
System.String serviceName
System.String message
System.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
System.Net.HttpStatusCode

Message

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

ServiceName

Gets the service name which related to this exception.

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

Methods

ToString()

Returns a summary of this exception.

Declaration
public override string ToString()
Returns
Type Description
System.String

A summary of this exception.

Overrides
System.Exception.ToString()

Implements

System.Runtime.Serialization.ISerializable

Extension Methods

Utilities.ThrowIfNull<T>(T, String)
In This Article
Back to top