Exception "URL, $path, not found."

76 views
Skip to first unread message

Александр Привалов

unread,
Nov 9, 2011, 4:09:12 PM11/9/11
to GluePHP
throw new Exception("URL, $path, not found."); -> throw new
DomainException("URL, $path, not found.");
Perhaps it would be better?

Joe

unread,
Nov 10, 2011, 9:36:22 AM11/10/11
to GluePHP
Hello,

> throw new Exception("URL, $path, not found."); -> throw new
> DomainException("URL, $path, not found.");
> Perhaps it would be better?

I was unaware that DomainException existed. Quick Googling finds:

http://stackoverflow.com/questions/1102979/when-would-you-throw-a-domainexception-in-php

So it's "domain" as in a set of data and not as in a URL domain.

I suppose $path not being found in the set of available paths would
constitute a DomainException, so it would work here.

Thank you for the suggestion. I think for now I will leave it as just
Exception, but anyone is more than welcome to modify it to
DomainException for their code.

Thanks again,
Joe

Александр Привалов

unread,
Nov 10, 2011, 10:47:05 AM11/10/11
to GluePHP
Sorry for the inattention, thank you.
Reply all
Reply to author
Forward
0 new messages