1

Java コードのアーカイブ ファイルを更新するために truezip (7.7.9 バージョン) を使用しています。

が呼び出されたときに try catch ブロックで上記のことを行っています。コードは自動的にブロックTFile.umount内の直接の行をスキップして に移動します。tryfinally

誰かが解決策を提案してくれれば本当に助かります。

try
{
    //to commit the changes in archive file
    TFile.umount(archive);
    upload(archive); //this line never executed so, I've added this method to finally block.
}
catch(Exception ex)
{
    uncommitted = true;
    logger.log(Level.INFO,"errorcommitting"+archive.getName());
}
finally
{
    if(!uncommitted)
        upload(archive);
}

コードに変更を加えて実行可能にしましたが、この方法で行うのは正しくありません。

4

0 に答える 0