Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Discussion on Exception Handling

Name: Anonymous 2012-01-27 15:56

What does /prog/ think of exception handling, as opposed to other methods such as return values or a global error variable/object? Personally, I think that exceptions in languages like C++ and Java have really introduced a much better method of handling errors that is language-independent. It makes your code infinitely more concise and readable, and now your errors actually have meaning beyond 0, "", null, etc.

I'm in my first year of computer programming at a local university, and we're just learning about exceptions now. It was like the world opened up; I couldn't believe how I could have accomplished anything before this, not knowing about exception handling. Never again will I have to use archaic methods of error handling.

Name: Anonymous 2012-01-28 21:43

>>15

Assertions are for internal errors. Errors in general are exceptional situations that can arise in the normal operation of a correct program.

Do you think you can just assert that you have enough memory? Or that you have the privileges to access something? Or that you're properly configured? Etc.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List