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

0
votes
2answers
32 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
36 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
4 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 ...
2
votes
5answers
88 views

FileNotFoundException in java

Im developing a simple android application which needs a text file access! Im getting filenotfoundexception eventhough i specified the absolute path of the file in File constructor.. My code is `File ...
0
votes
2answers
65 views

File being used by another process even if closed it before

I don't understand why the same code runs successfully on a 32-bit system, but trying to run it on a 64-bit system, always gives an error: File being used by another process I declare a file ...
2
votes
3answers
42 views

Which exception to throw for invalid input which is valid from client perspective

I am writing code to find and intersection of 2 lines. When slopes of the lines are equal they dont intersect. But on the other hand an input with slopes of equal value is completely valid. public ...
0
votes
1answer
16 views

Wrapping thrown errors so they don't crash the node webserver (node-mongodb-native)

Simplified code... but the basic scenario is I'm doing a findOne query with Mongo to lookup a user, but if the user doesn't exist it throws an error that crashes the entire webserver. Can someone ...
0
votes
1answer
61 views

Exception thrown while iterating in scala

I have an actor based system in which I am reading an external file sitting in an S3 bucket and moving taking each of the file lines and sending it over to another actor that processes that particular ...
2
votes
1answer
44 views

Handling Data Access Layer Exception in MVVM using Inversion on Control

I'm studding MVVM in C#. I want to use Inversion of Control (IoC). I use the framework Unity. I don't understand how to handling exception that could be raised from Data Access Layer. Here a little ...
0
votes
1answer
36 views

Using Anonymous thread for catching Exceptions

I asked around regarding catching checked exceptions in the context of a thread; the accepted answer was to use Callables and Futures. But I realized that I can simply wrap the "working" method with ...
0
votes
2answers
47 views

C++: accessing an array of unknown size by using try/catch

I was using Java for quite a time and had to move back to C++. I didn't use try/catch in C++ so much before, and now when I work again, I encountered probably a very silly problem. I have an array of ...
6
votes
5answers
123 views

“Uncatching” an exception in python

How should I "rethrow" an exception, that is, suppose: I try something in my code, and unfortunately it fails. I try some "clever" workaround, which happens to also fail this time If I throw the ...
-2
votes
1answer
80 views

Try/Catch statement not working [closed]

I am having some trouble with this particular try/catch block. It should work, but every time I enter a letter, I still get a NumberFormatException. Can anyone identify the problem with this code? ...
1
vote
3answers
33 views

How to avoid 'Unassigned Local Variable' defined inside a try-catch block

This is one error that I regularly face. Although I manage to circumvent it using some way or another, it really annoys me. In the code snippet below, I want to safe guard against exceptions from ...
0
votes
2answers
40 views

having trouoble executing a “cmd” or batch file from c#

i need to run a batch file (or a cmd) from c# . my code is this simple: Process.Start(@"C:\b.bat"); Process.Start(@"cmd.exe"); i have also tried Executing Batch File in C# , and many other sites ...

1 2 3 4 5 415
15 30 50 per page