Der zweite Catch-Block behandelt alle anderen aufgetretenen Fehler mit Abbruch.
The second Catch block handles any other terminating errors that occur.
Wenn ein Catch-Block gefunden wird, werden die darin enthaltenen Anweisungen ausgeführt.
If one is found, the statements in the Catch block are executed.
Zurückgeben von Fehlerinformationen vom CATCH-Block an den aufrufenden Batch oder die Anwendung.
Return error information from the CATCH block to the calling batch or application.
Der CATCH-Block wird nur im Falle einer Exception ausgeführt und enthält die gewünschte Fehlerbehandlung.
The CATCH block is only executed if an exception occurs; it contains the error handling code.
Wenn in einer der Anweisungen im TRY-Block ein Fehler auftritt, wird die Steuerung an die erste Anweisung im CATCH-Block übergeben.
If an error occurs in one of the statements in the TRY block, control passes to the first statement in the CATCH block.
Veranlassen der Ausführung zu einem Sprung von einem TRY-Block zum zugehörigen CATCH-Block.
Cause execution to jump from a TRY block to the associated CATCH block.
Fehler im CATCH-Block werden entsprechend den Verbindungs- und Prozedureinstellungen behandelt, es sei denn, die Anweisungen, die sie generieren, sind von weiteren TRY... CATCH-Anweisungen umschlossen.
Errors in the CATCH block are handled according to the connection and procedure settings unless the statements generating them are enclosed in additional TRY... CATCH statements.
Der CATCH-Block ist die Fehlerbehandlungsroutine für die TRY-Anweisung.
The CATCH block is the error handler for the TRY statement.
Tritt eine Exception auf, so wird erst der CATCH-Block ausgeführt und anschließend auch der FINALLY-Block.
If an exception does occur, the CATCH block will be executed first, followed by the FINALLY block.
Es zeigt außerdem, wie RAISERROR zum Zurückgeben von Informationen zu dem Fehler verwendet werden kann, der einen CATCH-Block aufgerufen hat.
It also shows how to use RAISERROR to return information about the error that invoked the CATCH block.
Geben Sie einen Schweregrad von 10 oder geringer an, um Meldungen mithilfe von RAISERROR zurückzugeben, ohne einen CATCH-Block aufzurufen.
Specify a severity of 10 or lower to return messages using RAISERROR without invoking a CATCH block.
PRINT übergibt die Steuerung nicht an einen CATCH-Block.
PRINT does not transfer control to a CATCH block.
Kopieren GO Das folgende Codebeispiel zeigt, wie RAISERROR in einem TRY-Block verwendet wird, damit die Ausführung zum zugehörigen CATCH-Block springt.
GO The following code example shows how to use RAISERROR inside a TRY block to cause execution to jump to the associated CATCH block.