Program logic bugs vs input/environmental errors (checked exceptions)

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Wed Oct 1 23:39:16 PDT 2014


On 02/10/14 01:19, David Nadlinger wrote:

> What are you referring to specifically? Compared to Tango, yes, Phobos
> might have a lot fewer concrete exception types. But I don't recall
> actually eliminating existing ones.

It happens implicitly when using "enforce". By default it will throw an 
instance of Exception. In most cases I don't think the developer bothers 
with specifying a specific exception type.

I really, really hate this. It makes it basically impossible to do any 
form of error handling correctly. I think Exception should be an 
interface or abstract class.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list