Why do exceptions usually have the suffix 'Exception' in the class name?
Posted
by Pheter
on Stack Overflow
See other posts from Stack Overflow
or by Pheter
Published on 2010-05-18T21:29:37Z
Indexed on
2010/05/18
21:40 UTC
Read the original article
Hit count: 223
It seems to me that it is rendundant information as the usage of the class will make it apparent that it is an exception. Furthermore, in PHP, the class must extend the Exception
class so it will be apparent that it is an exception when looking at the class on its own.
Despite this, developers usually apply the suffix 'Exception'. Why is this?
© Stack Overflow or respective owner