Download for Windows Premium
Publiciteit
catch-Block
catch block
Sobald die Ausnahme ausgelöst wird, wird der catch-Block ausgeführt.
When the exception occurs, control transfers to the catch block.
Wenn keine Ausnahme im try-Block ausgelöst wird, wird der catch-Block nicht ausgeführt.
If no exception is thrown in the try block, the catch block is skipped.
Sie verwenden einen catch-Block, um entweder den Fehler zu beheben oder die Exception weiterzuwerfen.
You use a catch block to either compensate for the error or rethrow the exception.
Die unsichere Aktion wird in einen try-Block geschrieben und bei Auftreten eines Problems, kann diese Ausnahme in einem catch-Block behandelt werden.
The unsafe action is written to a try block, and if a problem occurs, this exception can be handled in a catch block.
Der try-Block soll erfolgreich ausgeführt werden. Wenn das nicht der Fall ist, dann soll die Kontrolle an den catch-Block übergeben werden.
That is, you want the try block to succeed, and if it does not succeed, you want to pass control to the catch block.
In solchen oder ähnlichen Fällen benutze ich zwei Sicherheitmechanismen um sicherzustellen, dass die Exception wirklich zu ignorieren war und nicht aus Faulheit ignoriert wurde: der Name der abgefangenen Exception heißt ignored und der catch-Block hat einen Kommentar
In such and similar cases I usually use two safeguards to ensure that the exception ignoring was really intended and not just laziness: the caught exception is called ignored and the catch block has a comment.
Eine throw-Anweisung kann in einem catch-Block verwendet werden, um die von der catch-Anweisung abgefangene Ausnahme erneut auszulösen.
A throw statement can be used in the catch block to re-throw the exception, which has been caught by the catch statement.
Falls eine Ausnahme auftritt, wird der Kontrollfluss sofort zum catch-Block mit dem Ausnahmeobjekt als Parameter umgeleitet.
If an exception is thrown, the script's control flow immediately transfers to the statements in the catch block, with the exception available as the error argument.
Auf den try-Block muss ein catch-Block, ein abschließender finally-Block oder beides folgen.
A try block must be followed by a catch block(s), a finally block, or both.
Der finally-Block wird ausgeführt, wenn der try-Block verlassen wird (oder - falls vorhanden - der catch-Block), um Code auszuführen, der auf jeden Fall am Ende laufen soll, egal ob ein Fehler auftrat oder nicht.
The finally block executes after execution leaves the try block (or if present, the catch block), to perform cleanup code, whether or not an error occurred.
Sobald eine Ausnahme durch den Code im try-Block (oder eine Funktion, die im try-Block ausgeführt wird) ausgelöst wurde, wird die Kontrolle an den catch-Block übergeben.
If any statement within the try block (or in a function called from within the try block) throws an exception, control immediately shifts to the catch block.
Wenn eine Exception geworfen wird, wird der Programmcode hinter der auslösenden Anweisung nicht ausgeführt, und PHP versucht, den ersten passenden catch-Block zu finden.
When an exception is thrown, code following the statement will not be executed, and PHP will attempt to find the first matching catch block.
Wenn man selbst die Meldungen für Ausnahmen definieren möchte, um sich diese Eigenschaften zunutze zu machen (z. B. falls der catch-Block nicht zwischen System-Ausnahmen und selbst definierten Ausnahmen unterscheidet) kann man den Error-Konstruktor benutzen.
If you are throwing your own exceptions, in order to take advantage of these properties (such as if your catch block doesn't discriminate between your own exceptions and system ones), you can use the Error constructor.
Er zijn geen resultaten gevonden voor deze term.

Synoniemen voor catch-Block in het Duits

Publiciteit

Resultaten: 103. Exact: 103. Verstreken tijd: 37 ms.