watchdog_exception($type, Exception $exception, $message = NULL, $variables = array(), $severity = RfcLogLevel::ERROR, $link = NULL)
Logs an exception.
This is a wrapper logging function which automatically decodes an exception.
Parameters
$type: The category to which this message belongs.
$exception: The exception that is going to be logged.
$message: The message to store in the log. If empty, a text that contains all useful information about the passed-in exception is used.
$variables: Array