Skip to content

Instantly share code, notes, and snippets.

@freshjones
Created June 5, 2015 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freshjones/bfc60702fa09db755b7e to your computer and use it in GitHub Desktop.
Save freshjones/bfc60702fa09db755b7e to your computer and use it in GitHub Desktop.
try catch for entity wrappers
try
{
}
catch(EntityMetadataWrapperException $exc)
{
watchdog(
'MODULE_NAME',
'See ' . __FUNCTION__ . '() <pre>' . $exc->getTraceAsString() . '</pre>',
NULL, WATCHDOG_ERROR
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment