Apologies if this isn't the right place for this but have a query about try-catch and when to use it. Different articles I've read all say different things.
Should they be used when a class object is created, whilst some articles say you should throw an exception whenever a calculation is attempted and something goes wrong (such as invalid option).
On the other hand, some code I've seen pass true or false back from a calculation based upon the result.
I appreciate there's no hard or fast rules and it may be down to personal preferences, but are there any rough guidelines to follow? Are there any articles or books that are worth reading that could help someone new to php5 understand it a little better.
Many thanks.