<?php
class MyCustomException extends Exception {}
try {
    throw new MyCustomException("Exceptional", 112);
} catch (Exception $e) {
    /* Note the use of the third parameter to pass $e
     * into the RuntimeException. */
    throw new RuntimeException("Rethrowing", 911, $e);
}
?>