# OfficePatchException

Raised when a JSON Patch or JSON Merge Patch cannot be applied to a structured document such as YAML or TOML: the patch is malformed, a test fails, a pointer…

Class 

`OfficeIMO`

**Namespace**

`OfficeIMO`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`78706d0f9c0e` with working tree changes

**Source**

[OfficePatchException.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/78706d0f9c0ecb8c19bb788cfda578b014be7948/Sources/OfficeIMO.Core/Text/OfficePatchException.cs#L18)

**Base**

`Exception`

**Implements**

`ISerializable`

**Modifiers**

sealed

Raised when a JSON Patch or JSON Merge Patch cannot be applied to a structured document such as YAML or TOML: the patch is malformed, a test fails, a pointer addresses nothing, or the document refuses an edit. The document is unchanged when it is raised.

## Inheritance

- Exception
- OfficePatchException

Filter members 

Show inherited

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual Exception GetBaseException()` [#](#method-getbaseexception)

Inherited from Exception

Returns

`Exception`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public virtual void GetObjectData(SerializationInfo info, StreamingContext context)` [#](#method-getobjectdata-serializationinfo-streamingcontext)

Inherited from Exception

`Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId = "SYSLIB0051", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")` `EditorBrowsable(1)`

Parameters

**info SerializationInfo required**

**context StreamingContext required**

`public Type GetType()` [#](#method-gettype)

Inherited from Exception

Returns

`Type`

`public override string ToString()` [#](#method-tostring)

Inherited from Exception

Returns

`string`

## Properties

`public int OperationIndex { get; }` [#](#property-operationindex)

[OfficePatchException.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/78706d0f9c0ecb8c19bb788cfda578b014be7948/Sources/OfficeIMO.Core/Text/OfficePatchException.cs#L18)

Gets the zero-based index of the JSON Patch operation that failed, or -1 when the patch as a whole did.

`public string? Path { get; }` [#](#property-path)

[OfficePatchException.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/78706d0f9c0ecb8c19bb788cfda578b014be7948/Sources/OfficeIMO.Core/Text/OfficePatchException.cs#L21)

Gets the path member of the operation that failed, when it has one.

## Inherited Properties

`public MethodBase? TargetSite { get; }` [#](#property-targetsite)

Inherited from Exception

`public virtual string Message { get; }` [#](#property-message)

Inherited from Exception

`public virtual IDictionary Data { get; }` [#](#property-data)

Inherited from Exception

`public Exception? InnerException { get; }` [#](#property-innerexception)

Inherited from Exception

`public virtual string? HelpLink { get; set; }` [#](#property-helplink)

Inherited from Exception

`public virtual string? Source { get; set; }` [#](#property-source)

Inherited from Exception

`public int HResult { get; set; }` [#](#property-hresult)

Inherited from Exception

`public virtual string? StackTrace { get; }` [#](#property-stacktrace)

Inherited from Exception

<!-- PowerForge markdown artifact sha256:E60721815CF4CF77110BDEA83BFF0428D4ECDA3004BF3AA3120B70CAFCDF4420 -->
