# OfficeConvertError Class

> Thrown by Document::from_office_file when a document does not convert.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.5.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.5.0/class/OfficeConvertError
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.5.0/llms.txt

```cpp
class OfficeConvertError : Error
```

**Namespace:** `datalogics_interface`

**Inherits from:** [`Error`](https://docs.datalogics.com/apdfl21/ModernCPP/21.5.0/class/Error.md)

## Description

Thrown by Document::from_office_file when a document does not convert. Carries the plug-in's status code and message as well as what(), which reads "[Category] detail".

## Constructors

### OfficeConvertError

```cpp
datalogics_interface::OfficeConvertError::OfficeConvertError(Category category, int plugin_result_code, const std::string &detail)
```

*constructor*

**Parameters**

- `category` (`Category`): What kind of failure.
- `plugin_result_code` (`int`): The plug-in's status, or -1 when the plug-in never answered.
- `detail` (`const std::string &`): The plug-in's message, or curator's when the plug-in never answered.

## Methods

### category

```cpp
Category datalogics_interface::OfficeConvertError::category() const noexcept
```

**Returns:** `Category`

What kind of failure.

### detail

```cpp
const std::string & datalogics_interface::OfficeConvertError::detail() const noexcept
```

**Returns:** `const std::string &`

The plug-in's message, or curator's when the plug-in never answered.

### get_error_code

```cpp
DL_ERROR_MEMBER int datalogics_interface::Error::get_error_code() const noexcept
```

**Returns:** `DL_ERROR_MEMBER int`

The Adobe PDF Library error code, or 0 when the failure carries none.

Decode the value with the APDFL `ErrGetSeverity`, `ErrGetSystem` and `ErrGetCode` macros, or compare it against a whole code.

### plugin_result_code

```cpp
int datalogics_interface::OfficeConvertError::plugin_result_code() const noexcept
```

**Returns:** `int`

The plug-in's status code, or -1 when the plug-in never answered.
