Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 11.0.1 (日本語) » Mobile Link - サーバ管理 » Mobile Link サーバ API » Java による同期スクリプトの作成 » Java 用 Mobile Link サーバ API リファレンス

 

ServerException クラス

構文
public ianywhere.ml.script.ServerException
備考

サーバで同期の進行を妨げるエラー状態が存在することを示すために発行されます。この例外が発行されると、Mobile Link サーバはシャットダウンされます。

メンバ

ianywhere.ml.script.ServerException のすべてのメンバ (継承されたメンバも含みます) を以下に示します。

次のコードは、致命的な問題が発生した場合に ServerException をスローできる関数です。ServerException がスローされると、Mobile Link サーバはシャットダウンされます。

public void handleUpload(UploadData ud)
    throws SQLException, IOException, ServerException
{

    UploadedTableData tables[] = ud.getUploadedTables();
    if (tables == null) {
        throw new ServerException("Failed to read uploaded tables");
    }

    for (int i = 0; i < tables.length; i++) {
        UploadedTableData currentTable = tables[i];
        println("table " + java.lang.Integer.toString(i)
            + " name: " + currentTable.getName());

        // Print out delete result set.
        println("Deletes");
        printRSInfo(currentTable.getDeletes());

        // Print out insert result set.
        println("Inserts");
        printRSInfo(currentTable.getInserts());

        // print out update result set
        println("Updates");
        printUpdateRSInfo(currentTable.getUpdates());
    }
}

ServerException コンストラクタ