Skip to content

Instantly share code, notes, and snippets.

@andevsoftware
Last active February 28, 2016 19:49
Show Gist options
  • Save andevsoftware/dea855ad1d7ea31843f3 to your computer and use it in GitHub Desktop.
Save andevsoftware/dea855ad1d7ea31843f3 to your computer and use it in GitHub Desktop.
Phalcon REST - Outputting Errors
<?php
try {
// Handle application
} catch (Exception $e) {
$response = $di->get(Services::RESPONSE);
$response->setErrorContent($e, true); // true enables debugMode (more error information)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment