jeudi 19 janvier 2012

Dynamics Ax 2009, Exception Handling

void run() {
    try
    {
        startLengthyOperation();
        this.readFile();   
    }
    catch (Exception::Deadlock)
    {
        retry;
    }
    catch (Exception::Error)
    {
        error(strfmt("An error occured while trying to read the file %1", filename));
    }
    catch
    {
        error("An unkown error has occured");
    }

    endLengthyOperation();
}

Aucun commentaire:

Enregistrer un commentaire