> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OnWarning メソッド

このメソッドはクライアント側で実装します。[**ClassificationTrainer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/classificationtrainer.md) オブジェクトおよび [**DataSetTableRecords**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/datasettablerecords.md) オブジェクトの一部のメソッドの実行時に、ABBYY FlexiCapture SDK から呼び出されます。処理中に発生したヒントと警告をクライアントに通知します。

## 構文

```vb Visual Basic .NET theme={null}
Sub OnWarning(Message As String)
```

```cpp C++ theme={null}
HRESULT OnWarning( BSTR Message );
```

## パラメーター

**Message**

\[in] このパラメーターには、ヒントまたは警告が格納されます。

## 戻り値

\[C++ のみ] このメソッドが S\_OK 以外の値を返した場合は、クライアント側でエラーが発生したことを示します。

## 備考

このメソッドをクライアント側で実装する際は、メソッド内でスローされたすべての例外を確実にキャッチして処理し、例外がメソッドの外部に伝播しないようにする必要があります。例外がメソッドの外部に伝播すると、予期しない結果 (プログラムの終了など) を招くおそれがあります。

## 関連項目

[**IProcessingEvents**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/iprocessingevents.md)

[**ClassificationTrainer**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/classificationtrainer.md)
