Top "Try-catch" questions

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

What is the real overhead of try/catch in C#?

So, I know that try/catch does add some overhead and therefore isn't a good way of controlling process flow, …

c# .net performance optimization try-catch
Try With Resources vs Try-Catch

I have been looking at code and I have seen try with resources. I have used the standard try-catch statement …

java try-catch try-with-resources
Finally in C++

Is this a good way to implement a Finally-like behavior in standard C++? (Without special pointers) class Exception : public Exception { …

c++ exception try-catch throw finally
Java, try-catch with Scanner

I am creating a small algorithm and this is a part of it. If the user enters non integer values, …

java input try-catch java.util.scanner inputmismatchexception
How to get the last exception object after an error is raised at a Python prompt?

When debugging Python code at the interactive prompt (REPL), often I'll write some code which raises an exception, but I …

python exception try-catch read-eval-print-loop
When to use Try Catch blocks

Ok, this might be a very noob question, but I find that PHP Documentation on that and several Internet Searches …

php try-catch
Powershell try/catch with test-connection

I'm trying to have offline computers recorded in a text file so that I can run them again at a …

powershell try-catch get-eventlog
How to tell lapply to ignore an error and process the next thing in the list?

I have an example function below that reads in a date as a string and returns it as a date …

r error-handling try-catch lapply
How do I save warnings and errors as output from a function?

I'm using lapply to run a complex function on a large number of items, and I'd like to save the …

r error-handling try-catch
Java: Try-Catch statement within a Do-While loop

I am trying to execute a bit of code that scans for a user input value. This action is contained …

java exception-handling try-catch do-while inputmismatchexception