Top "Try-catch" questions

try-catch is a syntactic construct for catching exceptions raised by a code section

AppleScript: on error (try) line number

Is it possible to get the line number, where the script threw an error? Example: try set a to "abc" + "123" …

applescript try-catch onerror
Performance of try-catch in php

What kind of performance implications are there to consider when using try-catch statements in php 5? I've read some old and …

php performance exception-handling try-catch
Implementing retry logic for deadlock exceptions

I've implemented a generic repository and was wondering if there is a smart way to implement a retry logic in …

c# entity-framework try-catch repository-pattern database-deadlocks
Using try/catch for preventing app from crashes

I have been working on an Android app which uses try/catch frequently to prevent it from crashing even on …

java android design-patterns coding-style try-catch
Ruby equivalent for Python's "try"?

I'm trying to convert some Python code into Ruby. Is there an equivalent in Ruby to the try statement in …

python python-3.x ruby try-catch language-comparisons
Dart catch clause

I recently stumbled across the following Dart code: void doSomething(String url, String method) { HttpRequest request = new HttpRequest(); request.open(…

exception-handling try-catch dart
Catching a SoapException thrown by a WebService

I wrote the following service : namespace WebService1 { [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] …

c# exception asmx try-catch soapexception
Is there a way to catch an Exception without having to create a variable?

In PHP, I sometimes catch some exceptions with try/catch : try { ... } catch (Exception $e) { // Nothing, this is normal } With that …

php exception error-handling try-catch php-8
What are the circumstances under which a finally {} block will NOT execute?

In a Java try{} ... catch{} ... finally{} block, code within the finally{} is generally considered "guaranteed" to run regardless of what …

java jvm try-catch try-catch-finally
How to catch error of require() or include() in PHP?

I'm writing a script in PHP5 that requires the code of certain files. When A file is not available for …

php error-handling try-catch require fatal-error