Skip to content

Instantly share code, notes, and snippets.

@jeavila
Last active April 18, 2017 07:00
Show Gist options
  • Save jeavila/b2c976c847fa678f04e121709f3bc842 to your computer and use it in GitHub Desktop.
Save jeavila/b2c976c847fa678f04e121709f3bc842 to your computer and use it in GitHub Desktop.
Bloque básico para controlar una excepción
<?php
try {
// Aquí se prueba el código
}
catch(Exception $e) {
// Captura o lanzamiento de la excepción
}
finally {
// Opcional, pero si existe ocurrirá halla excepción o no
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment