An exception is an occurrence in an application process that requires deviation from the program's normal flow.

learn more… | top users | synonyms (1)

2
votes
2answers
66 views

Dealing with runtime exceptions when reading from file

Let's say I read a bunch of numbers from a text file. Each line is initially a string, I need to parse it to an integer. This is where the first exception might happen - NumberFormatException thrown ...
1
vote
1answer
97 views

If LYBL is faster than EAFP, why should I use try/except over hasattr?

I was once told that hasattr is simply getattr with exception handling. This is not the case, because hasattr is implemented in C like the rest of Python's builtins. I was curious one day, so I ...
2
votes
0answers
73 views

Design interfaces with annotated exceptions, but reduce the need for exception wrapping / re-branding?

I am designing a library with a bunch of interfaces with annotated exceptions. (The example is in (pseudo)PHP, but I am sure one could do something equivalent in Java or other.) For now, the ...
2
votes
0answers
71 views

Handling exceptions in multiple-issue CPUs

From what I read, VLIWs execute instructions in bundles, i.e. the CPU loads a bundle of instructions and dispatches them all at once. This is possible because the compiler scheduled instructions in ...
2
votes
0answers
50 views

Multiple handlers of an exception, and handling exceptions in the UI

Related to: Is onError handler better than exceptions? Premise I am writing a piece of library code that performs certain tasks, to separate concerns, we decided it should not write to a log or ...