Linked Questions

-1 votes
1 answer
322 views

I used to work in .NET c# and recently I started learning objective-c and iOS programming. Several times I've read that objective-c is exception unfriendly and I shouldn't handle them. I know it's ...
KlimczakM's user avatar
  • 13k
-2 votes
1 answer
87 views

In the following block: try (final InputStream fis = new BufferedInputStream(Files.newInputStream(f.toPath())); final ArchiveInputStream ais = factory.createArchiveInputStream(fn, fis)...
Damon Getsman's user avatar
99 votes
10 answers
51k views

How expensive are exceptions in C#? It seems like they are not incredibly expensive as long as the stack is not deep; however I have read conflicting reports. Is there definitive report that hasn't ...
Chance's user avatar
  • 11.3k
53 votes
12 answers
64k views

If I generate an exception on my own, I can include any info into the exception: a number of code line and name of source file. Something like this: throw std::exception("myFile.cpp:255"); But what's ...
Mar's user avatar
  • 971
64 votes
7 answers
38k views

I've been interviewed recently and the interviewer wanted me to do a technical test to see my knowledge. After I finished it he gave me feedback about how I did it, which I didn't expect and I ...
Adrián Pérez's user avatar
69 votes
6 answers
36k views

I'm using promises and have code that looks like the following: function getStuff() { return fetchStuff().then(stuff => process(stuff) ).catch(err => { console.error(err); }); } ...
Benjamin Gruenbaum's user avatar
34 votes
10 answers
30k views

Today, in my C++ multi-platform code, I have a try-catch around every function. In every catch block I add the current function's name to the exception and throw it again, so that in the upmost catch ...
Igor's user avatar
  • 27.4k
28 votes
5 answers
19k views

The main problem with throwing exceptions from destructor is that in the moment when destructor is called another exception may be "in flight" (std::uncaught_exception() == true) and so it is not ...
anton_rh's user avatar
  • 9,442
12 votes
5 answers
30k views

I am currently adding handling to a segment of code so that it will not crash. Currently it has each step then an ASSERT statement to make sure nothing went wrong in the previous step. If something ...
marsh's user avatar
  • 2,750
8 votes
5 answers
9k views

I haven't read much about it, but the author at the link below recommends that I don't use "bubble up" to centralize error handling in VBA. Excel Programming Weekend Crash Course via Google Books ...
user avatar
13 votes
3 answers
8k views

Is it safe to ignore exception of boost::lexical_cast when converting int to std::string?
dimba's user avatar
  • 27.9k
7 votes
6 answers
6k views

I'm currently working on a C++ project, where dynamic arrays often appear. I was wondering, what could be the correct way to initialize a dynamic array using the new-operator? A colleague of mine told ...
mefiX's user avatar
  • 1,347
10 votes
7 answers
3k views

I have to parse a String that can assume hex values or other non-hex values 0xff, 0x31 or A, PC, label, and so on. I use this code to divide the two cases: String input = readInput(); try { ...
user avatar
4 votes
1 answer
7k views

the following code is giving error, and i dont know whats the reason, and how remove this error, tell me what i am doing wrong. def members(id:String,name:String) = Action { implicit request => ...
user avatar
3 votes
3 answers
780 views

Today, someone told me that we should always wrap every exception at the top level of the framework. The reason is the original exception may contains sensitive information in the stacktrace or ...
Eric's user avatar
  • 655

15 30 50 per page