note 104968 added to class.domainexception
| From: | johnny dot bojowkarz at gmail dot com | Date: | Tue, 19 Jul 2011 10:27:32 +0000 |
| Subject: | note 104968 added to class.domainexception | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181689@lists.php.net to get a copy of this message | ||
<?php
function divide($dividend, $divisor)
{
if($divisor == 0) {
throw new \DomainException(
'Zero does not belong to the domain of this functions.'
);
}
return $dividend / $divisor;
}
?>
<?php
function logarithm($argument, $base)
{
if($base <= 0 || $base == 1) {
throw new \DomainException(
'Specified base does not belong to the domain of this function.'
);
}
if($argument <= 0) {
throw new \DomainException(
'Specified argument does not belong to the domain of this function.'
);
}
return log($argument, $base);
}
?>
----
Server IP: 82.177.164.100
Probable Submitter: 83.27.87.234
----
Manual Page -- http://www.php.net/manual/en/class.domainexception.php
Edit -- https://master.php.net/note/edit/104968
Del: integrated -- https://master.php.net/note/delete/104968/integrated
Del: useless -- https://master.php.net/note/delete/104968/useless
Del: bad code -- https://master.php.net/note/delete/104968/bad+code
Del: spam -- https://master.php.net/note/delete/104968/spam
Del: non-english -- https://master.php.net/note/delete/104968/non-english
Del: in docs -- https://master.php.net/note/delete/104968/in+docs
Del: other reasons-- https://master.php.net/note/delete/104968
Reject -- https://master.php.net/note/reject/104968
Search -- https://master.php.net/manage/user-notes.php