exception-handling

Why is no_data_found ORA-01403 an exception in Oracle?

If the SELECT INTO statement doesn't return at least one row, ORA-01403 is thrown. For every other DBMS I know this is normal on a SELECT. Only Oracle treats a SELECT INTO like this. CREATE OR REPLACE PROCEDURE no_data_proc IS dummy dual.dummy%TYPE; BEGIN BEGIN SELECT dummy INTO dummy FROM dual WHERE d...

Readable C++\CLI Exception Message in C#?

the following code throws an exception in C++ and catch in C# C++ throw std::exception ("a C++ exception"); When i catch in C#, it gives me the following: [SEHException (0x80004005): External component has thrown an exception.] here is how i call the C++ code using Foo.Bar.Sample; //C++ library .... Class1 class1 = new Class1()...

Any way to stop Javascript from failing silently?

One thing that is driving me nuts is how Javascript fails silently in many different situations. (removed example because it confuses the point of my question) Many times I have come across an error that will give an error message when typed into the Firebug console, but when it runs within the page script, it fails silently, even with...

asp.net gridview + BLL "exception was unhandled"

I have a gridview in a page, linked to an objectdatasource that is linked to a function in a BLL. the gridview delete query links to a delete method in the BLL class. When something goes wrong, I throw a new exception in the BLL class. Now to catch this exception if anything goes wrong, I have written the following behind the gridview ...

How to handle uncaught exception from slot in Qt Jambi?

Sometimes, the Jambi framework code calls some of my code - for example, when I've connected a button's clicked signal to my own slot, and the button gets clicked. Now, if my code then throws an exception, Jambi swallows that exception and prints it to the console. I'd like to handle the exception manually (because I want to write it to...

do exceptions reduce performance?

My application traverses a directory tree and in each directory it tries to open a file with a particular name (using File.OpenRead()). If this call throws FileNotFoundException then it knows that the file does not exist. Would I rather have a File.Exists() call before that to check if file exists? Would this be more efficient? ...

JAVA: What do the return values mean for ArrayIndexOutOfBoundsException exceptions?

When my program throws the exception, i'm getting a return value of 7. What exactly does a 7 mean, and where can I get a list of these return values? Or is that just the first line where it happened (although i got a -1 one time)? Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 7 at DataReader.get(DataReader.ja...

How to see the error and still keep the program on in the Python shell?

I know try/except can handle errors in my program. But, is there a way of making the error be displayed in the program execution, be ignored and let the execution go on? ...

Expection Handling

catch (Exception ex) { DBGlobals.Error("OHMjson.Graph.saveLastGraphName - Error: " + ex.getMessage()); msg = "Unable to save data"; status = false; } This piece of code would throw an status as false, if i encounter an error. Instead should i thrown New expection. Is this the right way. How can i handle exception in a be...

exception handling in c#

i want to know do finally block still execute in exception handling even if there is no matching catch block for the try block and if not then what happens? Also i want to now system exception and application difference ...

Access violation while the program was idle - not trace information to track down the bug

Hi. I have a program that just popped up an AV. Until now the Eureka Log could find the source code line that generated the error but now it displays only this: Access violation at address 7E452E4E in module 'USER32.dll'. Read of address 00000015. Call Stack Information: ----------------------------------------------------------------...

Are there any ELMAH-style exception logging components for non-http applications?

ELMAH is purpose-built for logging exceptions in ASP.Net, which is fine, but it does leave a lot of people (myself included) wanting to solve the same all-encompassing exception logging/viewing problem for non-web applications. Do you know of any open source components for general purpose exception logging and reporting in the vein of E...

Objective-C catch specific type of exception

Hi, I (as some of you know from my other questions :)) am building a cocoa-touch static library, and I have the code [NSException raise:@"This is the name of my exception" format:@"This is my format", nil] scattered throughout my project as a shortcut to subclassing NSException. This is coming back to bite me, as that I need to catch ONL...

How to extract error info from Java log files (post-logging)

I'm trying to collect some advices on error logging in java. My log file is huge and going trough it is time consuming, currently I'm grep(ing) my log looking for error(ERROR) pattern, and then looking at line which threw exception then I search/find it and check out the error. Is there some better way of reading log files more efficien...

C# Exception Handling

I have class that predominately consists of gather string input and then subsequently outputting the data in a certain format. The result of the class is basically a ToString() override. With my class I have a static method string Print(string path) that reads the inputs from a flat file. It then parses these inputs and generates an i...

Is it a good practice to have specific Exceptions for everything? Or is it better to reuse a bit more abstract exception?

Hi! I am dealing with a project, in wich I have written one Exception for each possible exception situation. The point is that I find it more "readable", but I am getting an insane amount of different exceptions. Is it considered a good practice to do it like that? Or should I write just exceptions a bit more abstract, in order to have...

Exception handling in pure C

Possible Duplicate: C : How do you simulate an 'exception' ? Hi, I know that exception handling is available in C++ but not in C. But I also read that exception handling is provided from OS side, so isnt there any function for C invoking the same behavior from OS as try catch and throw? Thanks. ...

Should I return null or throw an exception?

I found questions here http://stackoverflow.com/questions/175532/return-null-or-throw-exception and http://stackoverflow.com/questions/1626597/should-functions-return-null-or-an-empty-object, but I think my case is quite different. I'm writing an application that consists of a webservice and a client. The webservice is responsible to ac...

No force of exception handling?

Hi! Programming Java in Eclipse, I'm used to having to deal with exceptions. In C# with VisualStudio it seems I can not say "throws exception" on a method... After a lot of coding I found lots of exceptions, and had to catch them as I found them during testing. I'd like to be forced to handling them, so that VisualStudio can say that he...

VB.NET Custom Errors Messages

...