# RtfReadLimitException

Thrown when an RTF input exceeds a configured resource limit.

Class 

`OfficeIMO.Rtf`

**Namespace**

`OfficeIMO.Rtf`

**Assembly**

`OfficeIMO.Rtf`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[RtfReadLimitException.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Diagnostics/RtfReadLimitException.cs#L9)

**Base**

`InvalidOperationException`

**Implements**

`ISerializable`

**Modifiers**

sealed

Thrown when an RTF input exceeds a configured resource limit.

## Inheritance

- InvalidOperationException
- RtfReadLimitException

Filter members 

Show inherited

## Constructors

`public RtfReadLimitException(string code, string message, string limitSource, long actual, long limit, int position = -1)` [#](#constructor-ctor-string-string-string-int64-int64-int32)

[RtfReadLimitException.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Diagnostics/RtfReadLimitException.cs#L9)

Initializes a new resource-limit exception.

Parameters

**code string required**

**message string required**

**limitSource string required**

**actual long required**

**limit long required**

**position int = -1 optional**

## 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 string Code { get; }` [#](#property-code)

[RtfReadLimitException.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Diagnostics/RtfReadLimitException.cs#L18)

Stable machine-readable limit code.

`public string LimitSource { get; }` [#](#property-limitsource)

[RtfReadLimitException.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Diagnostics/RtfReadLimitException.cs#L21)

Name of the [RtfLoadOptions](/api/rtf/officeimo-rtf-rtfloadoptions/) property that supplied the limit.

`public long Actual { get; }` [#](#property-actual)

[RtfReadLimitException.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Diagnostics/RtfReadLimitException.cs#L24)

Observed or declared value that exceeded the limit.

`public long Limit { get; }` [#](#property-limit)

[RtfReadLimitException.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Diagnostics/RtfReadLimitException.cs#L27)

Configured limit.

`public int Position { get; }` [#](#property-position)

[RtfReadLimitException.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Rtf/Diagnostics/RtfReadLimitException.cs#L30)

Zero-based source position, or -1 when unavailable.

## 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:AAD2C3076FBF3F0838BF60883E2E9B88030CFDF65753B87CC35574596A7762F1 -->
