Как выполняется код после исключения?

Наверное, я что-то упускаю... Как может быть выброшено исключение, но код, следующий за исключением, все равно попадает в отладчик?

private UpdaterManifest GetUpdaterManifest()
{
    string filePathAndName = Path.Combine(this._sourceBinaryPath, this._appName + ".UpdaterManifest");

    if (!File.Exists(filePathAndName))
    {
        // This line of code gets executed:
        throw new FileNotFoundException("The updater manifest file was not found. This file is necessary for the program to run.", filePathAndName);
    }

    UpdaterManifest updaterManifest;

    using (FileStream fileStream = new FileStream(filePathAndName, FileMode.Open))
    {
        // ... so how is it that the debugger stops here and the call stack shows
        // this line of code as the current line? How can we throw an exception
        // above and still get here?
        XmlSerializer xmlSerializer = new XmlSerializer(typeof(UpdaterManifest));
        updaterManifest = xmlSerializer.Deserialize(fileStream) as UpdaterManifest;
    }

    return updaterManifest;
}
6
задан Bob Horn 19 December 2011 в 15:38
поделиться