9 points

https://stackoverflow.com/a/5685943

Here is the answer, M$ changed their mind at some point and your university has a stale information but it seems it was true in the past.

permalink
report
reply
5 points
*

This is a reucurring theme at this specific subject unfortunately. He doesn’t seem to put much effort into it, as most slides are just plain text and nothing else. I stopped attending after the second class.

permalink
report
parent
reply
2 points

That truly sucks. Yeah, some professors can be like that. I had a math professor offer bonus points to the first 3 students completed the assignment, only for the majority to cheat and just look up the answer and turn that in. It became a contest of who could copy the fastest and one student even admitted to doing it, but she just didn’t care and gave points to the cheaters anyway.

permalink
report
parent
reply
3 points

I swear all lecturer slides are outdated for programming.

permalink
report
parent
reply
1 point

Thanks for looking that up, because the application exception is the way I originally learned this myself. And I’ve been doing .net for 20 years.

permalink
report
parent
reply
1 point

Do you guys still use it in practice though? I have never seen or heard about this until now.

permalink
report
parent
reply
5 points

I have never extended from or caught an application extension in my entire career. Agree with Microsoft, if it’s an application exception it’s coming from the framework. All of mine derive from exception.

permalink
report
reply
3 points

M$ Docu sounds like that doesn’t make sense, do you have some more context?

permalink
report
reply
6 points

It is a relic of the past, where Microsoft intended developers to inherit all their custom exceptions from ApplicationException. Shortly after, they changed their mind and advised that custom exceptions should derive from the base Exception class.

Apparently. (Source: https://stackoverflow.com/questions/5685923/what-is-applicationexception-for-in-net)

permalink
report
parent
reply
3 points
*

I should have elaborated, but basically what MD87 replied. During the development of .NET it was decided that every exception caused by programs should inherit from ApplicationException, and all system errors should inherit from SystemException. Unfortunately .NET devs didn’t follow this and now everything should just inherit Exception since it’s easier to check. Interestingly, both SystemException and ApplicationException seem functionally identical to Exception.

permalink
report
parent
reply
1 point

Which actually makes sense. Java logic with exceptions that you cannot catch is a practice no other language has.

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 3.6K

    Monthly active users

  • 1.5K

    Posts

  • 35K

    Comments