トランスフォーメーション > JavaトランスフォーメーションAPIリファレンス > incrementErrorCount
  

incrementErrorCount

セッションのエラーカウントを増やします。エラー数がセッションのエラーしきい値に達すると、セッションは失敗します。
Javaエディタの任意のセクション([パッケージのインポート]を除く)でincrementErrorCountを使用します。
以下の構文を使用します。
incrementErrorCount(int nErrors);
引数
データ型
入出力
説明
nErrors
Integer
入力
セッションのエラーカウントとして増やすエラーの数。
以下のJavaコードを使用すると、トランスフォーメーションの入力フィールドがNULL値の場合にエラーカウントが増加します。
// Check whether input employee ID or name is null.
if (isNull ("EMP_ID_INP") || isNull ("EMP_NAME_INP"))
{
     incrementErrorCount(1);

     // If input employee ID or name is null, don't generate an output row for this input row.
     generateRow = false;
}