Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution.

learn more… | top users | synonyms

7
votes
0answers
38 views

JavaScript: Pass error reason in thrown object

I am developing a small Node.js package which contains a parser. It throws as soon as it detects a non-recoverable problem. I have used Java for quite some years and I am used to a mass of ...
1
vote
2answers
22 views

Chaining Parallel Tasks to an End Condition or Error Condition

I'm trying to wrap my head around some of the syntax and structure for parallel tasks in C#, specifically around chaining multiple tasks and handling errors. The specific sequence of steps I'm ...
0
votes
0answers
16 views

.NETZ packer and Unhandled Exceptions

I'm using .NETZ to pack my WPF application running it in the post-build event. My application uses AppDomain.CurrentDomain.UnhandledException to catch every kind of unhandled exceptions at top level. ...
0
votes
1answer
13 views

Load-time exception handling in AngularJS

I need to execute a function which is defined in controller in load-time, in order to gain json data from another place right after page is loaded. I've tried to call the func immediately within ...
1
vote
0answers
20 views

An asynchronous operation cannot be started at this time Exception occurs on calling webservice in mvc?

In my ASP.NET MVC 3 project I'm calling a web service for login authentication. But it throws an exception: Exception Details: An asynchronous operation cannot be started at this time. ...
5
votes
1answer
47 views

Cleanest way to execute code outside of try block only if no exception is thrown

This question is about the best way to execute code outside of try block only if no exception is thrown. try { //experiment //can't put code after experiment because I don't want a possible ...
1
vote
3answers
40 views

C++ Exceptional handling query

Can some one please explain how sequence of exceptional handling is taking place in below code? How did it evaluate to "~B() called Handler of function try block of D()Exception in D" #include ...
-1
votes
2answers
67 views

Why return null after catching an Exception? [closed]

I've encountered some code which is catching RestClientException and then returning null. I think this is bad practice ? Why would a developer (who has since moved on) do this ? The method in which ...
1
vote
1answer
36 views

Why can't I use midge to mock a function that throws using slingshot's throw+

Here's the situation: I'm trying to unit test function A that calls function B. Function B is called in a slingshot try+ block and under certain circumstances it can throw using a slingshot throw+. I ...
0
votes
4answers
45 views

removing last element in arraylist exception [closed]

at first I was having issues removing an element in an arraylist if it was the only one on the list, which i over came by simply setting all the varibles of the element to null/0 if it is the only ...
1
vote
2answers
39 views

Do method-scoped objects get destroyed when the method throws an exception?

void MyClass::method() { SomeObject a; methodThatCanThrowException(); } I wish to catch exceptions higher up the call-stack, not in method() - but in this example will the SomeObject destructor be ...
6
votes
2answers
70 views

Java Exception Classes

I am new to java and I was looking at exception handling. When we catch java exceptions, we declare and use an Object of the Exception class without initializing it i.e., catch(NullPointerException e) ...
0
votes
2answers
33 views

PHP - sensible/elegant/graceful error handling for a production environment

I'm writing a PHP web application which will be running under a production environment in the not too distant future, and rather than use the non-user-friendly die(), I thought I'd come up with a ...
0
votes
1answer
38 views

Find Exception type

If I have the following code: try { //some offensive code } catch (Exception e) { String type = //get type of e Assert.fail(type + " thrown."); } Is there a way I can get the type ...
0
votes
0answers
5 views

Handled exception in Observable.Start freezes UI

I have a situation that I'm beating my head against the wall, and have not been successful in getting any help from Google. I'm working on some legacy code that has an IObservable created with obs ...

1 2 3 4 5 416
15 30 50 per page