CakeFest 2025 Madrid: The Official CakePHP Conference

Voting

: max(two, six)?
(Example: nine)

The Note You're Voting On

ricky at rocker dot com
12 years ago
when raising an Exception with no error code explicitly defined, getCode() returns the integer 0

<?php
try {
throw new
Exception("no code!!");
} catch (
Exception $e) {
print(
"Code='" . $e->getCode() . "'");
}
?>

outputs

Code='0'

<< Back to user notes page

To Top