Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
-2 votes
1 answer
85 views

My question is about exception handling in Java. If after a potential exception is handled in a try{} catch (){} block, and everything after that runs as usual, then why do we need finally{}? I mean ...
1 vote
2 answers
86 views

I'm new to javascript and I have a question about promise chaining. I have two promises and want to return a promise that executes P2 after P1 regardless of whether P1 succeeded or failed, and return ...
Nu Nunu's user avatar
  • 426
0 votes
2 answers
423 views

After a computer crash and reinstallation of C++Builder 12.2 on a new computer, some code doesn't compile any more. For example: void __fastcall TSynCustomExporter::CopyToClipboardFormat(UINT AFormat) ...
1 vote
2 answers
167 views

I have a console app that I want to be able to exit via ctrl+c. In my codebase/external libraries there are types which absolutely need their Dispose/Close() methods called for cleanup. The suggested ...
-1 votes
1 answer
101 views

Suppose I have a function that does a bunch of work in steps. Between each step I want to either continue or skip the rest of the steps. After the work is done an additional block of code should ...
1 vote
3 answers
83 views

I know it's not possibile throw exception and return a value in the same method, but i need to do this in somehow. I was thinking to use finally block to throw the exception and after return the value....
cang's user avatar
  • 31
0 votes
1 answer
61 views

There are two blocks of Javascript code. Same fetch, same API. One uses await, the other doesn't. the document.write at the end erases was written in the finally block, but only if I use await, If I ...
1 vote
2 answers
1k views

I would have assumed a finally clause with only a pass to be pointless. But in a Bottle template, the following code for an optional include would not work without it. The result would contain ...
0 votes
3 answers
206 views

What are the differences between using a while loop vs recursion in try, except, finally error handling? When I use a while loop in user input error handling: while True: try: user_num = ...
1 vote
1 answer
155 views

Does implicit finally block exist for all try statements (try, try-finally, try-catch-finally) or only for try-with-resources?
bridgemnc's user avatar
  • 370
4 votes
1 answer
89 views

Sometimes I have a code in try-catch-finally block when finally branch does some cleanup code which may throw an Error. An error in the finally branch suppresses a possible error in the main branch. I ...
2 votes
1 answer
948 views

https://nearthespeedoflight.com/browser.html func untilThrowOrEndOfTokensReached<ConsumedType>(perform: () throws -> ConsumedType) -> [ConsumedType] { var results = [ConsumedType](...
3 votes
1 answer
257 views

I have an internal procedure that defines a buffer for a temp table and creates a record for that tt using the buffer but the buffer is not available in the finally block Example define temp-table ...
0 votes
3 answers
154 views

I was reading this article about Promise Basics on Javascript.info and came across an example about a usecase for the .finally() method. It says: The idea of finally is to set up a handler for ...
0 votes
2 answers
180 views

This example is from the documentation of HttpUrlConnection: URL url = new URL("http://www.android.com/"); HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); try { ...

15 30 50 per page
1
2 3 4 5
...
19

AltStyle によって変換されたページ (->オリジナル) /