Php - Exception

> Procedural Languages > Php

1 - About

Exception in Php

3 - Management

3.1 - Caught

try {
    echo inverse(5) . "\n";
} catch (Exception $e) {
    echo 'Caught exception: ',  $e->getMessage(), "\n";
} finally {
    echo "First finally.\n";
}

3.2 - Throw

throw new Exception('Youla not good !');

4 - Documentation / Reference

Advertising